import{G as i}from"./GraphinaGoogleChartBase.js";class a extends i{setUpChartsHandler(){this.chartHandlers={bar_google:r=>this.observeChartElement(r,"BarChart")}}observeChartElement(r,e){gcfe_public_localize.view_port==="off"?(this.observer||(this.observer=new IntersectionObserver(t=>{t.forEach(o=>{o.isIntersecting&&(this.setupChart(jQuery(o.target),e),this.observer.unobserve(o.target))})},{threshold:.1})),this.observer.observe(r[0])):this.setupChart(r,e),this.setupChartTypeSwitcher(r)}getFinalChartOptions(r,e){return r.vAxis&&r.vAxis.format==="percent"&&(r.vAxis.format="#'%'"),r}setupTableData(r,e,t,o,n){const s=r==null?void 0:r.google_chart_data;s&&Array.isArray(s.title_array)&&Array.isArray(s.data)&&s.title_array.length>0&&s.data.length>0?(e.addColumn("string",s.title),s.title_array.forEach(()=>{e.addColumn("number",""),s.annotation_show&&e.addColumn({type:"string",role:"annotation"})}),s.data.forEach(h=>{e.addRow(h)}),t.show(),o.hide()):Array.isArray(r.columns)&&r.columns.length>0&&Array.isArray(r.rows)&&r.rows.length>0?(r.columns.forEach(h=>e.addColumn(h)),r.rows.forEach(h=>e.addRow(h)),t.show(),o.hide()):(t.hide(),o.show())}}window.graphinaGoogleBarChart=new a;
//# sourceMappingURL=bar_google.js.map
