This is a migrated thread and some comments may be shown as answers.
Scale Labels in units
3 Answers 36 Views
This is a migrated thread and some comments may be shown as answers.
Sujatha
Top achievements
Rank 1
Sujatha asked on 16 Jul 2013, 06:28 PM
Is there a way to  represent the scale labels in kilos say 100k, 200k, 1m in the radial Gauge ?
Since I have to display pointer value 2985653 and scale labels are large.

3 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 17 Jul 2013, 07:04 AM
Hi Sujatha,

In order to achieve this you could use a scale.labels.template. For example:

$("#gauge").kendoRadialGauge({
  //....
  scale: {
     labels: {
         template: "#= value# K"
     }
  }
});
  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
Sujatha
Top achievements
Rank 1
answered on 17 Jul 2013, 10:43 AM
When I tried the code, the 'K' is getting appended to the label value. I want to automatically convert the numbers 1000 to 1k and display on the gauge scale. How to do that ?
0
Accepted
Iliana Nikolova
Telerik team
answered on 17 Jul 2013, 03:29 PM
Hello Sujatha,

In order to achieve this you should create a custom function which converts the numbers 1000 to 1k. For example:

$("#gauge").kendoRadialGauge({
  //....
  scale: {
    //....
    labels: {
        template: "#= Math.round(value / 1000) #k"
    }
 }
});
  Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Asked by
Sujatha
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Sujatha
Top achievements
Rank 1
Share this question
or