This is a migrated thread and some comments may be shown as answers.

valueAxis Scaling

5 Answers 941 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 25 Jul 2012, 07:40 PM
Is there a way to set the scale for the valueAxis?  For example, right now my y axis for a line chart is showing labels in intervals of 20 (up to the max 220), and its pretty crowded.  I'd like to be able to set the scale to be in increments of 50, so on the y axis I'd see 0,50,100,150, etc.

5 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 26 Jul 2012, 11:11 AM
Hello Steven,

You could control the interval between major divisions via the majorUnit of the value axis. Also, you could configure the min and the max value of the valueAxis. For example, the scenario you are trying to implement could be achieved using the following code snippet: 
$("#chart").kendoChart({
 //...
 seriesDefaults: {
    type: "line"
 },
  valueAxis: {
    majorUnit: 50,
    max: 250,
    min: 0 
  }
 });

I hope this helps.
 
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
IT Purchasing
Top achievements
Rank 1
answered on 10 Feb 2014, 07:02 PM
Hi Iliana,

I was curious is there a way to set and arbitrary scale?  For example, my scale is 0-100, but I only want labels at 40, 70 and 90 where my plot band (really just a line) are.  See attached if it helps.
0
Iliana Dyankova
Telerik team
answered on 11 Feb 2014, 02:19 PM
Hi,

I am afraid this scenario is not supported by Kendo UI Chart and there is no a suitable workaround I can suggest. Please accept my apologies for any inconvenience this may cause. 

Regards,
Iliana Nikolova
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

0
Shalom
Top achievements
Rank 1
answered on 14 Sep 2017, 02:00 PM

Is this scenario still not supported by Kendo UI Chart?

Thanks,

Shira

0
Stefan
Telerik team
answered on 19 Sep 2017, 07:06 AM
Hello Shalom,

Currently, a custom plotBands can be added to the Chart:

http://docs.telerik.com/kendo-ui/controls/charts/how-to/appearance/custom-plot-bands

The labels can be displayed only for specific values using the valueAxis.labels.template property. It can be set to a function, and the value of the label will be return if it meets certain conditions:

http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart#configuration-valueAxis.labels.template

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Charts
Asked by
Steven
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
IT Purchasing
Top achievements
Rank 1
Shalom
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or