2
这里是我的图表对象。如何为系列添加highcharts-ng饼图自定义颜色?
$scope.chartConfig = {
options: {
chart: {
type: 'pie',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: 'Status Counts in the Current Stage.'
},
plotOptions: {
pie: {
dataLabels: {
enabled: false
},
showInLegend: true
}
}
},
series: [{
data: [
['foo', 10],
['bar', 90],
['baz', 100]
]
}],
loading: true
};
在这里我需要为foo,bar,baz分隔用户定义的颜色。如何在highchart-ng中做到这一点。
佐丹奴我都试过,但我添加颜色到该阵列的方案,它不会更改图表中的颜色。 – user3045354
你可以发布你的代码吗? – Giordano
我刚刚将对象更改为此。数据:[ \t \t \t [ '富',10, '#E94B3B'], \t \t \t [ '酒吧',90, '#8AD5E7'], \t \t \t [ '巴兹',100,'# F8C471' ] \t \t \t] – user3045354