valueAxis Scaling

6 posts, 0 answers
  1. Steven
    Steven avatar
    8 posts
    Member since:
    Mar 2012

    Posted 25 Jul 2012 Link to this post

    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.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 26 Jul 2012 Link to this post

    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!
  3. IT Purchasing
    IT Purchasing avatar
    6 posts
    Member since:
    Jul 2011

    Posted 10 Feb 2014 in reply to Iliana Nikolova Link to this post

    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.
  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 11 Feb 2014 Link to this post

    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).

  5. Shalom
    Shalom avatar
    1 posts
    Member since:
    May 2016

    Posted 14 Sep in reply to Iliana Nikolova Link to this post

    Is this scenario still not supported by Kendo UI Chart?

    Thanks,

    Shira

  6. Stefan
    Admin
    Stefan avatar
    1134 posts

    Posted 19 Sep Link to this post

    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.
Back to Top