Reputation: 2928
How do I format data being shown on a kendo ui bar chart?
I need some money values to be shown for example as "£5k" rather than "£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.
Upvotes: 1
Views: 5504
Reputation: 2928
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) #"
}
},
Upvotes: 4
Reputation: 4968
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.
Upvotes: 1