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

How to get the MinValue of the YAxis?

1 Answer 61 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Michael Hunt
Top achievements
Rank 1
Michael Hunt asked on 03 Dec 2014, 07:33 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Danail Vasilev
Telerik team
answered on 05 Dec 2014, 08:15 AM
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.

 
Tags
Chart (HTML5)
Asked by
Michael Hunt
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or