我正在使用canvas.js库来生成列数据。
var chart = new CanvasJS.Chart("<%=BankBalanceChartContainer.ClientID%>", {
//colorSet: "chartdatacolor",
theme: "light2",
exportFileName: "Doughnut Chart",
exportEnabled: true,
animationEnabled: true,
legend:{
cursor: "pointer",
itemclick: explodePie
},
axisX: {
valueFormatString: "MMM YYYY",
interval: 1,
intervalType: "month"
},
axisY: {
valueFormatString: "$#,##0.##",
},
legend:{
cursor: "pointer",
itemclick: explodePie
},
toolTip:{
content: "{name}: "+ billingcurrency +" {y}"
},
data: [
{
type: "doughnut",
radius: 100,
innerRadius: 50,
showInLegend: true,
indexLabel: " {label}",
indexLabelFontSize: 12,
dataPoints: dataArray,
}
]
});
chart.render();
标签中的甜甜圈
显示为:
美国100.00
125.00新元
不使用indexLabelMaxWidth和indexLabelWrap。
使用Dom元素br