How to get the MinValue of the YAxis?

2 posts, 1 answers
  1. Michael Hunt
    Michael Hunt avatar
    42 posts
    Member since:
    Aug 2009

    Posted 03 Dec 2014 Link to this post

    Hi,

    We are using version 2014.2.724.40 of you ASP.NET for AJAX controls.  I am creating an HTMLChart in code (a column series and two line series).

    The values in the chart can be negative and the range of the numbers is unlimited (users could graph decimals, hundreds, thousands, etc...)  Therefore I am NOT specifically setting the MaxValue MinValue Step Skip, etc... properties of the Y axis.  I am letting the chart choose those automatically and it works well.

    My problem though is that if there are negative numbers, I need to know the minimum value of the Y Axis that the chart has automatically chosen.  I need to know that (I guess) so that I can set the  .YAxis.AxisCrossingValue = to that number.  And I need to do that (I guess) so that my x axis labels appear below the bottom of the chart.  If I don't do that of course, the labels appear above the bottom of the chart and that looks bad.

    So, in server-side code, is there a way to find out what the minimum YAxis value is?

    Or should I be doing this a different way?

    Thanks,
    Michael

  2. Answer
    Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 05 Dec 2014 Link to this post

    Hello Michael,

    Please find my comments and suggestions below:

       - In order to ensure that the x-axis crosses the y-axis at its min value you can just set a very large value for this crossing point.
       - The chart renders entirely on the client where are actually done the y-axis scale calculations. You can obtain the min value only on the client through the kendo widget as follows:
    $find('RadHtmlChartClientID').get_kendoWidget()._plotArea.valueAxis.options.min

        - You may also find useful this feedback item on the matter.

    Regards,
    Danail Vasilev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top