[英]Kendo chart formatting a axis
How do I format data being shown on a kendo ui bar chart?如何格式化显示在 kendo ui 条形图上的数据?
I need some money values to be shown for example as "£5k" rather than "£5000".我需要一些货币价值显示为例如“£5k”而不是“£5000”。
valueAxis: {
labels: {
format: "£{0}K"
},
title: {
text: "Cover note premium"
}
},
I don't know how to divide the value being put into this graph.我不知道如何划分放入该图中的值。
Finally found out how to divide a number on a label.终于找到了如何在标签上划分数字。
xAxis: {
min: 8,
max: 18,
title: {
text: "Hour of day"
},
labels: {
template: "#= kendo.format('{0}',value/60) #"
}
},
You can try this你可以试试这个
valueAxis: {
labels: {
format: "£"+("{0}"/1000)+"K"
},
title: {
text: "Cover note premium"
}
but you should do this manipulation somewhere else, not inline.但是您应该在其他地方进行这种操作,而不是内联。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.