现有图表代码如下:
jQuery("#staarAllSubjectGrades").kendoChart({
legend: {
visible: true,
position: 'bottom'
},
seriesDefaults: {
type: "column",
labels: {
visible: true,
template: "#= (!value || value < 0) ? 'N/A' : (value).toFixed(0) + '%' #",
}
},
tooltip: {
visible: true,
template: "#= series.name #: #= (!value || value < 0) ? 'N/A' : (value).toFixed(0) + '%' #",
color: 'white'
},
dataSource: {
data: finalData
},
series: series,
valueAxis: {
majorGridLines: {
visible: true
},
labels: {
template: "#= (value).toFixed(0) # %"
},
visible: true,
min: 0
},
categoryAxis: {
field: "DISTNAME",
labels: { visible: this.stateStaarAllSubjectGrades },
majorGridLines: {
visible: false
},
line: {
visible: false
}
}
})
输出图表如下:
当我使用以下 Angular 2 剑道图表代码时:
<kendo-chart>
<kendo-chart-category-axis>
<kendo-chart-category-axis-item [categories]="chartStaarAllSubjectGrades.categories">
<kendo-chart-category-axis-item-labels [visible]="stateStaarAllSubjectGrades">
</kendo-chart-category-axis-item-labels>
<kendo-chart-category-axis-item [majorGridLines]="{ visible: false }" [line]="{ visible: true }">
</kendo-chart-category-axis-item>
</kendo-chart-category-axis-item>
</kendo-chart-category-axis>
<kendo-chart-series>
<kendo-chart-series-item [data]="chartStaarAllSubjectGrades.series">
</kendo-chart-series-item>
</kendo-chart-series>
<kendo-chart-value-axis>
<kendo-chart-value-axis-item>
<kendo-chart-value-axis-item-labels [content]="value + '%'">
</kendo-chart-value-axis-item-labels>
</kendo-chart-value-axis-item>
</kendo-chart-value-axis>
</kendo-chart>
然后输出如下:
请帮助我如何在图表的左侧显示“%”以及如何显示与现有输出类似的标签