我正在使用带有反应的amchart,它在所有情况下都能正常工作,但是我有一个问题,我不想在工具提示上显示百分比
在这里我只想显示Plavix:457,而不是百分比
<AmCharts.React
style={{
width: "100%",
height: "500px",
marginTop: "-20px"
}}
options={{
"type": "pie",
"labelRadius": -35,
"labelText": "[[count]]",
"titles": titles,
"theme": "light",
"growSlices": true,
"innerRadius": "0%",
"dataProvider": reqData,
"valueField": "count",
"titleField": "name",
"colorField": "color"
}}/>
这是我的代码
答案 0 :(得分:0)
仅通过添加BalloonText属性就可以做到
<AmCharts.React
style={{
width: "100%",
height: "500px",
marginTop: "-20px"
}}
options={{
"type": "pie",
"labelRadius": -35,
"labelText": "[[count]]",
"titles": titles,
"theme": "light",
"growSlices": true,
"innerRadius": "0%",
"dataProvider": reqData,
"valueField": "count",
"titleField": "name",
"colorField": "color",
"balloonText": "[[name]]: [[count]]"
}}/>
“ balloonText”:“您想要的任何字符串”