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

RadChart Axis Min/Max Values

3 Answers 369 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 17 Oct 2012, 12:13 PM
Hello,

I'm using the RadHtmlChart, and I'm trying to programmably set the range of the X axis to a value.  The difficulty with my situation is that the chart will show values anywhere from 2000 to 8,000,000, and because of this, I'm trying to programmably set the range.  I set the XAxis MinValue and MaxValue to the values of the smallest and largest elements.  What I'm doing is, say I have an element of 1,000,000, and one of 1,500,000; I programmably use these values as the range (+/- 2000 to add some padding around it).  However, when I do this, it never takes.  It's as if these values are not retained, so it uses a MinValue of 0 and MaxValue of the maximum element plus some (whatever the default logic is).

How can I get this to work?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Oct 2012, 12:45 PM
Hello Brian,

I just tried this and it appears to be working fine with me with the following markup:
<telerik:RadHtmlChart runat="server" ID="rhc1">
    <PlotArea>
        <Series>
            <telerik:ColumnSeries>
                <Items>
                    <telerik:SeriesItem YValue="12345" />
                    <telerik:SeriesItem YValue="123456" />
                </Items>
            </telerik:ColumnSeries>
        </Series>
        <YAxis MinValue="10000" MaxValue="150000">
        </YAxis>
    </PlotArea>
</telerik:RadHtmlChart>

as you can see in the screenshot: http://screencast.com/t/PfdKkrVe. Is you setup much different?

Also, could you try upgrading to the latest version and see if this helps?

Another point of interest can be the fact that the control automatically adjusts the y-axis according to the values, so setting these properties may not be necessary.

Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Brian Mains
Top achievements
Rank 1
answered on 19 Oct 2012, 02:36 PM
Hi Marin,

I'm not talking defining values in markup, I'm talking in code.  It does not have the same result.

Could you please try again and see if you run into complications?

Thanks.
0
Marin Bratanov
Telerik team
answered on 22 Oct 2012, 02:20 PM
Hello Brian,

Indeed there seems to be a problem with the serialization of these properties. I am logging it for research and you can follow it, comment and vote in this URL. I have also updated your Telerik points for your report.


Greetings,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Chart (HTML5)
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Brian Mains
Top achievements
Rank 1
Share this question
or