如何在 pie amchart 中制作图例?
How to make legent in pie amchart?
演示和我的代码是这样的:https://jsfiddle.net/oscar11/4qdan7k7/6/
我正在使用:
"legend": {
"useGraphSettings": true
}
但它不起作用。结果是这样的:
有什么办法可以解决我的问题吗?
您应该删除 useGraphSettings
,因为您的设置中没有 graphs
:
AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "light",
"dataProvider": chartData,
"valueField": "litres",
"titleField": "country",
"export": {
"enabled": true
},
"legend": {},
});
演示和我的代码是这样的:https://jsfiddle.net/oscar11/4qdan7k7/6/
我正在使用:
"legend": {
"useGraphSettings": true
}
但它不起作用。结果是这样的:
有什么办法可以解决我的问题吗?
您应该删除 useGraphSettings
,因为您的设置中没有 graphs
:
AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "light",
"dataProvider": chartData,
"valueField": "litres",
"titleField": "country",
"export": {
"enabled": true
},
"legend": {},
});