import{G as c}from"./GraphinaApexChartBase.js";class d extends c{constructor(){super(),this.observer={},this.secondaryChart=[],this.secondaryChartData=[],this.dynamic_data=[]}setUpChartsHandler(){this.chartHandlers={brush:a=>this.observeChartElement(a,"area")}}afterRenderChart(a,t,r){this.initSChart(t,r)}applyDataLabelFormatter(a,t,r="brush"){let e=t.chart_datalabel_prefix??"",i=t.chart_datalabel_postfix??"",n=t.string_format===!0||t.string_format==="yes",s=parseInt(t.chart_label_pointer_number_for_label);(isNaN(s)||s<0||s>20)&&(s=0),a.dataLabels||(a.dataLabels={}),a.dataLabels.formatter=h=>{let o=h;return n&&(o=this.formatNumber(h,s)),e+o+i}}getChartOptions(a,t,r,e){return a}processDynamicData(a,t,r){r.chart_data_option===!0?this.dynamic_data=a:this.dynamic_data={}}initSChart(a,t){const r=jQuery(`.graphina-brush-chart-${a}-2`);let e=r.data("second_chart_options");ApexCharts.exec(`brush-chart-${a}-2`,"destroy"),this.secondaryChart[a]&&this.secondaryChart[a].destroy(),this.dynamic_data.length>0&&this.dynamic_data.extra.series.length>0&&t.chart_data_option===!0&&(e.series=this.dynamic_data.extra.series,e.xaxis.categories=this.dynamic_data.extra.category),this.applyYAxisFormatter(e,t),this.applyXAxisFormatter(e,t);try{this.secondaryChart[a]=new ApexCharts(r[0],e),this.secondaryChart[a].render()}catch(i){console.log(i)}}}window.graphinaBrushChart=new d;
//# sourceMappingURL=brush.js.map
