这只是一部分代码,我想显示的比例保留两位小数
chart3 = new Highcharts.Chart({ chart: { renderTo: 'container3', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, colors:[ '#66FF66', 'red', 'black' ], title: { text: '运营情况' }, tooltip: { pointFormat: '{series.name}: <b>{point.percentage}%</b>', percentageDecimals: 1 }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, color: '#000000', connectorColor: '#008000', format: '<b>{point.name}</b>: {point.percentage:.1f} %' }, } }, series: [{ type: 'pie', name: '所占比率', data: [ ['运营', b4_ratio], ['停运', b5_ratio], ['无运营信息',b6_ratio] ] }] });
添加回答
举报
0/150
提交
取消