RadChart Axis Min/Max Values

4 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 17 Oct 2012 Link to this post

    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.
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 19 Oct 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 19 Oct 2012 Link to this post

    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.
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 22 Oct 2012 Link to this post

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