【发布时间】:2017-07-24 16:56:27
【问题描述】:
我正在尝试为我的图表设置工具提示。该值是一个百分比,但我想要“实际”数字而不是要显示的百分比。字段名称是“moduleCount”,其中包含正确的值。但是,当我将鼠标悬停在图表上时,我收到来自 Angular 的“'moduleCount'未定义”错误。我假设我没有正确定义工具提示,因为“moduleCount”已定义并具有价值。
我的 HTML:
<div kendo-chart
k-series-defaults="{type: 'column', labels:{visible: true, background: 'transparent', field: 'modulePercentage', format:'p0', template: '#= value#%'}}"
k-series="[{field: 'modulePercentage', colorField: 'BackGroundColor', name: 'SSQScore', type: 'pie'}]"
k-plot-area="{margin:{top: 5, left: 25, right: 25, bottom: 5}}"
k-category-axis="{field: 'Score', labels:{font: 'bold 8px sans-serif', rotation: '-45'},majorGridLines:{visible: true}, line:{visible: true}}"
k-value-axis="{majorGridLines: {visible: true}, visible: true}"
k-tooltip="{visible: true,format: '{0}',template: '#=moduleCount #'}"
k-data-source="contractorStatus">
</div>
非常感谢任何帮助!
【问题讨论】:
标签: angularjs kendo-chart