AmCharts.AmPieChart饼图%默认2位小数改取整
饼图%的数据默认保留2位小数怎么样改成取整,就是比如显示22.74%想改成23%这个原先的部分代码,求高手指点哪里是不是加个属性能搞定啊???
chart = new AmCharts.AmPieChart();
chart.dataProvider = aveBarData;
chart.titleField = "label";
chart.valueField = "value";
chart.labelRadius = 1;
chart.labelText = "[[percents]]%";
chart.depth3D = 20;
chart.angle = 55;
legend = new AmCharts.AmLegend();
legend.align = "center";
legend.markerType = "circle";
legend.switchType = "v";
chart.addLegend(legend);
chart.write("avePie"); AmCharts --------------------编程问答-------------------- 千辛万苦还是自己找到了,加个属性,终于搞定了!
chart['percentFormatter']['precision']=0;
补充:Java , Web 开发