【发布时间】:2014-05-24 04:35:35
【问题描述】:
我正在使用 Kendo 饼图,并且我想将其配置为在没有要显示的数据时显示一条消息。我正在使用以下 js 函数配置饼图 - 变量“JsPieChartDataSet”是一组 JSON 格式的数据。
有没有可以设置在没有数据时显示消息的属性?
function pieType() {
/*Pie chart render*/
$("#piechart").kendoChart
({
theme: $(document).data("kendoSkin") || "metro",
title: { visible: true, color: "black", margin: 0, text: JsBreakdownPieTitle },
legend: { position: "bottom", margin: 0 },
seriesDefaults:
{
labels: {
template: "#= kendo.format('{0:P}', percentage)#",
font: "8pt Arial, Helvetica, sans-serif",
visible: true,
distance: 10
},
type: "pie"
},
series: JsPieChartDataSet,
tooltip: {
visible: true,
format: "{0:N2} tCO2e",
font: "10px Arial, Helvetica, sans-serif"
}
});
}
【问题讨论】:
标签: charts kendo-ui kendo-chart