引用URL,如何隐藏饼图周围的值?我需要这样做来消耗空间。我找不到办法。
我正在使用融合图表的免费版本
试试
<chart [..........] showLabels='0' showValues='0' [...........] >
尝试在 <chart>
元素中使用 showNames='0' showValues='0'
。
您可以使用这些配置来隐藏饼图的值
"showlabels": "0",
"showvalues": "0"
参考代码 -
FusionCharts.ready(function() {
var revenueChart = new FusionCharts({
type: 'pie2d',
renderAt: 'chart-container',
width: '550',
height: '350',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Split of revenue by product categories",
"subCaption": "Last year",
"numberPrefix": "$",
"showPercentInTooltip": "0",
"decimals": "1",
//Theme
"theme": "fusion",
"tooltipBorderRadius": "20",
// hide lables & values
"showlabels": "0",
"showvalues": "0"
},
"data": [{
"label": "Food",
"value": "285040"
},
{
"label": "Apparels",
"value": "146330"
},
{
"label": "Electronics",
"value": "105070"
},
{
"label": "Household",
"value": "49100"
}
]
}
}).render();
});
参考 JsFiddle