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

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

9 Answers 246 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Jussi
Top achievements
Rank 1
Jussi asked on 08 Jun 2011, 09:09 AM
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

9 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 13 Jun 2011, 09:36 AM
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
0
Jussi
Top achievements
Rank 1
answered on 13 Jun 2011, 09:43 AM
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.
0
Jussi
Top achievements
Rank 1
answered on 13 Jun 2011, 11:16 AM
I'll try to find time for creating an example and support ticket in the coming weeks.
0
Evgenia
Telerik team
answered on 16 Jun 2011, 08:37 AM
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
0
Karuna
Top achievements
Rank 1
answered on 07 Jan 2013, 09:25 AM
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
0
Evgenia
Telerik team
answered on 10 Jan 2013, 07:53 AM
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.

0
Karuna
Top achievements
Rank 1
answered on 11 Jan 2013, 06:51 AM
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.




0
Yavor
Telerik team
answered on 16 Jan 2013, 07:49 AM
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.

0
Harsh
Top achievements
Rank 1
answered on 02 Jul 2013, 11:37 AM
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.
Tags
Chart
Asked by
Jussi
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Jussi
Top achievements
Rank 1
Karuna
Top achievements
Rank 1
Yavor
Telerik team
Harsh
Top achievements
Rank 1
Share this question
or