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

Percentage Format in Rad Chart

3 Answers 406 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Vamsi
Top achievements
Rank 1
Vamsi asked on 10 Aug 2010, 01:18 AM
I have a bar type chart and i have to display percentage format on the y axis. If i set the appearence of the y axis to percentage it is multiplying the values by 100 more and displaying the Percentage Format. This is happening in both autoscale set to true or false. Could You please suggest how can i get the actual values on y -axis for percent rather than the values which are increased by 100.

In the screenshot attched you see that the values for the chart are between 0 - 100 and if the format is specified default or number or currrency the scale is set to 0-120. But if i change it to percentage it is showing values ranging from 0-12000%. Instead i want 0 - 120 scale with % sign next to it.

3 Answers, 1 is accepted

Sort by
0
Accepted
Giuseppe
Telerik team
answered on 11 Aug 2010, 06:31 PM
Hello Vamsi,

You can achieve the desired effect like this:

RadChart1.PlotArea.YAxis.Appearance.CustomFormat = "0\\%";

Hope this helps.


All the best,
Freddie
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
Vamsi
Top achievements
Rank 1
answered on 13 Aug 2010, 07:24 PM
That solves my problem. Thanks a lot for quick reply.
I have 2 other issues which i am trying to find a solution. Could you please suggest any solution for these.
1. I have a Line Chart which should have min value other than zero for y axis depending on chart values. For example if the chart min value is 11995 and max value is 21540 then i want min value to start close to 11995 like 11900. I dont have a decent algorithm to set the scale for y axis since the chart values are dynamic. so i am trying to find out if i can set min value for the chart and remaning values (step and max value) to be taken as per autoscale.
2. The custom format you gave for y axis is working perfectly fine. I have to show the similar for chart values also. For this i tried to set the ChartSeries.DefaultLabelValue with some custom formats, but i am not getting the correct value with % sign next to it.
0
Vamsi
Top achievements
Rank 1
answered on 17 Aug 2010, 02:25 PM
I found solution to my issues. This is what i am using

1.ChartSeries.DefaultLabelValue =

"#Y{F0}%";
2.RadChart1.IsZeroBased = false;

 

 

 

 

 

 

 

 

 

Tags
Chart (Obsolete)
Asked by
Vamsi
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Vamsi
Top achievements
Rank 1
Share this question
or