Auto-scaling Y axis showing negative values even when there are none

10 posts, 0 answers
  1. Jussi
    Jussi avatar
    8 posts
    Member since:
    Nov 2010

    Posted 08 Jun 2011 Link to this post

    Hi,

    I'm trying to display some probability distribution functions using RadChart. These only contain positive values (with usually a lot of values around 1E-5). Sometimes RadChart scales Y axis to extend to negative values. Why does it do that? And how can I prevent this?

       - Jussi

  2. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 13 Jun 2011 Link to this post

    Hello Jussi,

    I guess you mean that you are setting the YValues of the Series to 1E+5 as 1E-5 that you mentioned will cause the Chart to display quite negative values (1E-5 = -100,000). Unfortunately it is hard for us to determine the cause of the problem from the information you provided. Could you elaborate a bit more on this issue - for example open new formal Support thread and send us a sample project where this problematic behavior reproduces? This way we will be able to investigate it more precisely and help you.

    Best wishes,
    Evgenia
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jussi
    Jussi avatar
    8 posts
    Member since:
    Nov 2010

    Posted 13 Jun 2011 Link to this post

    I mean 1E-5 as in 1*10^-5 = 0.00001, which definitely is positive.

    The screenshot shows how the graphs are displayed, even when there are no negative numbers in the series. I can provide you with a list of numbers in each of the area graphs if you still need more information.
  5. Jussi
    Jussi avatar
    8 posts
    Member since:
    Nov 2010

    Posted 13 Jun 2011 Link to this post

    I'll try to find time for creating an example and support ticket in the coming weeks.
  6. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 16 Jun 2011 Link to this post

    Hello Jussi,

    Please accept my apologies for misunderstanding you. Indeed 1E-5 as in 1*10^-5 = 0.00001, which definitely is positive. Sending us a sample project demonstrating the issue with the YAxis will help us supporting you further. Looking forward to hearing from you.

    Kind regards,
    Evgenia
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Karuna
    Karuna avatar
    5 posts
    Member since:
    Mar 2012

    Posted 07 Jan 2013 Link to this post

    Hi Jussi,

    Even I'm facing the same problem. My YAxis should be auto scale. because values come dynamically.
    Even there is no negative values, the chart is showing negative values below 0.

    If you have solved the problem, could you please share it with me?

    Thanks in advance.

    Karuna Kumar K
  8. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 10 Jan 2013 Link to this post

    Hello Karuna,

     Could you elaborate a bit more on this? It will be best if you can provide us with a sample project where this reproduces. For the purpose - please open a formal support thread and attach the runnable sample. We'll contact you after inspecting it.

    Regards,
    Evgenia
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  9. Karuna
    Karuna avatar
    5 posts
    Member since:
    Mar 2012

    Posted 11 Jan 2013 Link to this post

    Hi Evgenia,

    Here I shall elaborate the problem.

    I'm using radchart in my application in my asp.net application.
    Im binding the serieses with lists<int> from code behind.
    If the all the values of list are zero then line horizental plain line showing at the zero postion of y axis.
    But In Y axis its showing the negattive values also like 0 -10 -20 .....
    I want to show the only positive values starting from 0 to....

    .In one of the post you have given solution that 
    You can control the YAxis Items Labels that should be displayed by turning off the AutoScaleproperty and providing your own StepMinValue and MaxValue

    But Max value may vary to any value...
    So, Is there any other way to solve, without setting 
    Auto Scale to false , Step, Min and Max values.

    Your help is highly appreciated.

    Thanks,
    Karuna.




  10. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 16 Jan 2013 Link to this post

    Hi,

    In case that the autosizing option for the control does not meet your requirements well, one possible option in this case would be to check the data, and set the min/max values for the y-axis manually, from the code-behind. Other than this, there is no other option to handle the setup - you can either let the control autosize the axis, or set its properties manually, from the code-behind.

    All the best,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  11. Harsh
    Harsh avatar
    1 posts
    Member since:
    Jul 2013

    Posted 02 Jul 2013 Link to this post

    Hi Jussi & Karuna,

    I tried this, and it worked!
    chartvar.PlotArea.YAxis.VisibleValues = Telerik.Reporting.Charting.Styles.ChartAxisVisibleValues.Positive;

    The 'chartvar' here is a 'Telerik.Reporting.Chart' object.
    Please try this in your solution, and reply with the result.
    Or update me if you found any other solution.
Back to Top
UI for WPF is Visual Studio 2017 Ready