Change minimum value for Y-Axis

Thread is closed for posting
3 posts, 0 answers
  1. Stefan Willebrand
    Stefan Willebrand avatar
    20 posts
    Member since:
    Sep 2008

    Posted 16 Jan 2009 Link to this post

    How can I change the minimum value for the Y-Axis when loading data dynamically from a database? I have tried the following code in ItemDataBound but no joy:

    If

     

    e.SeriesItem.YValue < e.ChartSeries.PlotArea.YAxis.MinValue Then

     

    e.ChartSeries.PlotArea.YAxis.MinValue = e.SeriesItem.YValue

     

    End If

     

  2. Stefan Willebrand
    Stefan Willebrand avatar
    20 posts
    Member since:
    Sep 2008

    Posted 16 Jan 2009 Link to this post

    This was now fixed by setting the initial minimum value artificially high and setting autoscale="false" for the yaxis.
  3. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 19 Jan 2009 Link to this post

    Hello Stefan,

    Indeed, you will need to set AutoScale property to false in order to manipulate the axis settings - MinValue, MaxValue, Step. Still, if you only need to narrow down the range (i.e. not to start from 0) you can leave AutoScale set to true but set IsZeroBased property to false.

    Regards,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top