我正在使用AmCharts创建一个饼图。我试图改变传说lablelText来显示标题,百分比和价值。我尝试了以下无法正常工作:(这是传递给AmCharts.makeChart()方法
"legend": {
"align": "center",
"position": "right",
"marginRight": 21,
"markerType": "circle",
"right": -4,
"labelText": "[[title]]: [[percents]]% $[[value]]",
},
答案 0 :(得分:7)
最后我发现我应该使用valueText而不是labelText,因此能够改为:
"legend": {
"align": "center",
"position": "bottom",
"marginRight": 21,
"markerType": "circle",
"right": -4,
"labelText": "[[title]]",
"valueText": " $[[value]] [[percents]]%",
"valueWidth": 80,
"textClickEnabled": true
},