Hi there,
I am currently mocking up a demo of a chart. I have attached an image.
I need to replace the numbers on the right axis with labels.
For example,
0 will be Nil
5 will be Bronze
10 will be Silver
15 will be Gold
20 will be Platinum
25 will be Diamond
How can I show labels for that right axis instead of the numbers?
Regards,
Tony
I am currently mocking up a demo of a chart. I have attached an image.
I need to replace the numbers on the right axis with labels.
For example,
0 will be Nil
5 will be Bronze
10 will be Silver
15 will be Gold
20 will be Platinum
25 will be Diamond
How can I show labels for that right axis instead of the numbers?
Regards,
Tony
5 Answers, 1 is accepted
0
Hello Tony,
Iliana Nikolova
Telerik
From the provided picture it appears you are using Kendo UI ScatterLine Chart. I am afraid setting text labels instead of numbers on the axes is not supported for XY Charts (such as Scatter, ScatterLine etc.), however you could workaround it using a template for the axes. A possible implementation is demonstrated in this forum thread.
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tony
Top achievements
Rank 1
answered on 07 Aug 2013, 06:03 AM
Hi Illiana,
I believe this will work. Am I correct in my belief that this cannot be done using the MVC wrappers at this time, and I will have to use javascript directly?
Regards,
Tony
I believe this will work. Am I correct in my belief that this cannot be done using the MVC wrappers at this time, and I will have to use javascript directly?
Regards,
Tony
0
Hi Tony,
You could use Kendo UI Chart for ASP.NET MVC, however in the labels.template you should execute custom JavaScript logic in order to achieve the expected result.
Regards,
Iliana Nikolova
Telerik
You could use Kendo UI Chart for ASP.NET MVC, however in the labels.template you should execute custom JavaScript logic in order to achieve the expected result.
Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tony
Top achievements
Rank 1
answered on 08 Aug 2013, 12:20 AM
I'm not sure what you mean by executing custom JavaScript logic. Do you have an example?
0
Hi Tony,
Iliana Nikolova
Telerik
As pointed in the documentation, in the labels.template you could call a function. The idea of the suggested workaround is to create a function which sets text instead of numeric values to the axes labels.
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!