import{G as n}from"./GraphinaGoogleChartBase.js";class f extends n{setUpChartsHandler(){this.chartHandlers={donut_google:e=>this.observeChartElement(e,"PieChart")}}observeChartElement(e,r){gcfe_public_localize.view_port==="off"?(this.observer||(this.observer=new IntersectionObserver(t=>{t.forEach(o=>{o.isIntersecting&&(this.setupChart(jQuery(o.target),r),this.observer.unobserve(o.target))})},{threshold:.1})),this.observer.observe(e[0])):this.setupChart(e,r)}getFinalChartOptions(e,r){return e}getFinalChartData(e){return e}setupTableData(e,r,t,o,h){var i;((i=e==null?void 0:e.google_chart_data)==null?void 0:i.data.length)>0?(r.addColumn("string","Month"),r.addColumn("number","Sale"),e.google_chart_data.data.forEach(s=>r.addRow(s)),t.show(),o.hide()):(e==null?void 0:e.columns.length)>0&&e.rows.length>0?(e.columns.forEach((s,g)=>{r.addColumn(s[0],s[1])}),e.rows.forEach(s=>r.addRow(s))):(t.hide(),o.show());var l=new google.visualization.NumberFormat({prefix:h.prefix??"",suffix:h.suffix??""});l.format(r,1)}}window.graphinaGoogleDonutChart=new f;
//# sourceMappingURL=donut_google.js.map
