【发布时间】:2015-11-18 13:25:02
【问题描述】:
您好,我正在尝试使用 json 值绘制饼图高图,我有以下格式的 json 值。
Data= {"count":[62,58,10,6],"categoires":["a1","a2","a3","a4"]}
你好有这样的Highchart代码
$('#2Chieldrightdiv').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Browser market shares January, 2015 to May, 2015'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
},
showInLegend: true
}
},
series: [{
name: 'Brands',
colorByPoint: true,
data: [{
name: cat,
y: Count
}]
}]
});
}
但是图表没有绘制我是 Highchart 的新手,所以请帮我解决这个问题。
谢谢
【问题讨论】:
-
尝试删除除最必要的选项之外的所有选项以制作图表,然后添加您需要的各种选项,并查看它何时停止自行绘制。
标签: java jquery json highcharts