Web Server hangs when setting AutoScale to False on the YAxis

Thread is closed for posting
8 posts, 0 answers
  1. Imar
    Imar avatar
    27 posts
    Member since:
    Apr 2007

    Posted 12 Jan 2010 Link to this post

    Hi there,

    I have a Line chart that displays two series. I have AutoLayout set to true. When the maximum values of the series is equal to the maximum label value of the Y axis, I get a flat line at the top of the chart. In theory this is fine, but the line appears cut off, so you only see half of it.

    To work around this, I try to set the MaxValue on the YAxis programmatically to the maximum value of the items + 10%. So, if the highest items are 35000, I set MaxValue to 38500. In order for this to work, I also need to set AutoScale to False. However, as soon as I do that, my WebDevServer.exe hangs, and consumes all memory and CPU until it crashes. As soon as I remove the attribute, the page behaves OK, but the chart is cut off again.

    You can see a repro scenario in this test project
    http://imar.spaanjaars.com/Downloads/Other/TelerikChartIssue2.zip

    I am not programmatically setting this attribute, but through markup:

    <YAxis MaxValue="700000" > <%--AutoScale="false"--%>

    If you add the AutoScale attribute to the YAxis element, the server hangs.

    Is there a work around for this? How do I create some "padding" between the actual series line at the top of the PlotArea?

    Thanks for looking into this.

    Imar
  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 14 Jan 2010 Link to this post

    Hi Imar,

    Quick question - have you tried setting the AxisMode property to Extended? This built-in feature will extend the Yaxis range so that series do not look "cut off".

    Best wishes,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Imar
    Imar avatar
    27 posts
    Member since:
    Apr 2007

    Posted 14 Jan 2010 Link to this post

    Hi Vladimir,

    Thank you for your reply. Yes, setting AxisMode to Extended solves the cut-off problem.

    Any idea why the application crashes when AutoScale is set to False?

    Imar
  4. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 18 Jan 2010 Link to this post

    Hi Imar,

    That shouldn't happen. Can you send us a runnable sample which we can investigate? Thanks!

    All the best,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Imar
    Imar avatar
    27 posts
    Member since:
    Apr 2007

    Posted 18 Jan 2010 Link to this post

    Hi Vladimir,

    Please see the link in my first post in this thread. I can repro the problem with that application using VS 2008 on Windows Vista using the built-in web server of Visual Studio.

    Regards,

    Imar
  6. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 22 Jan 2010 Link to this post

    Hello Imar,

    The project cannot run as intended due to SQL server dependency. I have commented out the SQLDataSource, and set AutoScale=false, however, I cannot repro the crash. We would be really grateful if you can help us reproduce the problem.

    Sincerely yours,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Imar
    Imar avatar
    27 posts
    Member since:
    Apr 2007

    Posted 22 Jan 2010 Link to this post

    Hi Vladimir,

    The repro project (at http://imar.spaanjaars.com/Downloads/Other/TelerikChartIssue2.zip) has a database in the App_Data folder with a connection string targeting a local SQL Server Express instance. You should be able to run the project as-is, provided you have a local SqlExpress instance. Otherwise, you can attach the database to another instance and update the connection string....

    Cheers,

    Imar
  8. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 27 Jan 2010 Link to this post

    Hello Imar,

    Thanks for sending the project. The problem seems to be that when you are using AutoScale=false you also need to provide Step and MinValue. Using AutoStep=false means you are manually controlling the axis. By default it uses Step=1 and since your max value is 700,000 this means the chart will try to draw 700,000 axis tickpoints which fails. Hope this clears things up.

    Regards,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top