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
0
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:
I hope this helps.
Regards,
Iliana Nikolova
the Telerik team
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.
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
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
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
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
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.