import{G as n}from"./GraphinaApexChartBase.js";class m extends n{constructor(){super(),this.observer={}}setUpChartsHandler(){this.chartHandlers={radial:r=>this.observeChartElement(r,"radial")}}RadialChartDatalabelsFormat(r,t){const a=t.chart_datalabel_prefix,l=t.chart_datalabel_postfix;t.string_format?(r.plotOptions.radialBar.dataLabels.total.formatter=e=>{let i=e.globals.seriesTotals.reduce((o,_)=>o+_,0);return i=this.formatNumber(i,t.chart_label_pointer_number_for_label),a+i+l},r.plotOptions.radialBar.dataLabels.value.formatter=e=>(e=this.formatNumber(e,t.chart_label_pointer_number_for_label),a+e+l),r.yaxis.labels.formatter=e=>a+this.formatNumber(e,t.chart_label_pointer_number_for_label)+l):(r.plotOptions.radialBar.dataLabels.value.formatter=e=>(e=new Intl.NumberFormat(window.gcfe_public_localize.locale_with_hyphen,{minimumFractionDigits:t.chart_label_pointer_number_for_label,maximumFractionDigits:t.chart_label_pointer_number_for_label}).format(e),a+e+l),r.plotOptions.radialBar.dataLabels.total.formatter=e=>{let i=e.globals.seriesTotals.reduce((o,_)=>o+_,0);return i=new Intl.NumberFormat(window.gcfe_public_localize.locale_with_hyphen,{minimumFractionDigits:t.chart_label_pointer_number_for_label,maximumFractionDigits:t.chart_label_pointer_number_for_label}).format(i),a+i+l},r.yaxis.labels.formatter=e=>a+new Intl.NumberFormat(window.gcfe_public_localize.locale_with_hyphen,{minimumFractionDigits:t.chart_label_pointer_number_for_label,maximumFractionDigits:t.chart_label_pointer_number_for_label}).format(e)+l)}getChartOptions(r,t,a,l){return t==="radial"&&(r.labels=r.xaxis.categories,r.chart.events={mounted:(e,i)=>{const o=document.querySelector(`.graphina-elementor-chart[data-element_id="${l}"]`);o&&(o.style.height="")}}),this.RadialChartDatalabelsFormat(r,a),r}}window.graphinaRadialChart=new m;
//# sourceMappingURL=radial.js.map
