【发布时间】:2017-02-17 04:19:34
【问题描述】:
我正在使用 kendoUI 和 angular。我有一个剑道甜甜圈图表如下。
<div class="center-pad" kendo-chart k-theme="['material']" k-chart-area="{height: 325, width: 480}"
k-series="[{ type: 'donut',
field: 'percentage',
labels: {visible: true, template: '${value} ${category} ${dataItem.color}', position: 'outsideEnd', font: '15px Lato-Regular'},
categoryField: 'source',
explodeField: 'explode'}]"
k-series-click="actionChartClick" k-data-source="actionChartData">
我想将系列标签颜色作为系列颜色。在模板中,我可以通过${dataItem.color}访问模板颜色
我试过设置,
k-series="[{ ...
labels: {visible: true, template: '${value} ${category}', position: 'outsideEnd', font: '15px Lato-Regular', color: '${dataItem.color}'}"
但这没有用。 谁能指导我应该在哪里改变?
【问题讨论】:
标签: javascript angularjs kendo-ui kendo-chart