This question is locked. New answers and comments are not allowed.
I am using ChartView, and I am not able to format my double value in x-axis in percent format, for example, the value is 0.005 and I want to display it as 0.5% in my x-axis. below is my code
As you can see from above code, I try to use LabelFormat="P" to formate x-axis as I did in old telerik Chart but it doesn't work
<chart:ChartDataSource x:Name="DataSource" ItemsSource="{Binding Data}" SamplingUnit="NONE" />
<chart:RadCartesianChart Palette="Metro" Grid.Row="1" ClipToBounds="False" > <chartView:BarSeries ItemsSource="{Binding ElementName="DataSource"} CategoryBinding="Value" ValueBinding="Count" ShowLabels="True" /> <chart:RadCartesianChart.HorizontalAxis> <chartView:CategoricalAxis MajorTickInterval="1" LabelInterval="1" LabelFormat="P" PlotMode="OnTicksPadded"/> <chart:RadCartesianChart.VerticalAxis> <chartView:LinearAxis /> </chart:RadCartesianChart.VerticalAxis> </chart:RadCartesianChart>
As you can see from above code, I try to use LabelFormat="P" to formate x-axis as I did in old telerik Chart but it doesn't work
5 Answers, 1 is accepted
0
Hi,
Unfortunately for the time being the CategoricalAxis does not support formatting of the label, as the most common usage would be binding strings as a category and not numeric values. Our develoeprs are aware of this and will consider adding this ability for future versions of the control. In the meantime we would suggest that you bind strings, instead of doubles, to CategoryBinding in order to achieve the desired behavior.
All the best,
Nikolay
the Telerik team
Unfortunately for the time being the CategoricalAxis does not support formatting of the label, as the most common usage would be binding strings as a category and not numeric values. Our develoeprs are aware of this and will consider adding this ability for future versions of the control. In the meantime we would suggest that you bind strings, instead of doubles, to CategoryBinding in order to achieve the desired behavior.
All the best,
Nikolay
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0

Senthil kumar
Top achievements
Rank 1
answered on 19 Nov 2013, 08:49 AM
Hi,
I have a RadCartesianChart using a line axis and CategoricalAxis as HorizontalAxis. i want to represent the category axis whole integer format : 0 2 4 6 8.....
my code is
CategoricalAxis categoricalAxis = new CategoricalAxis();
categoricalAxis.LabelFitMode = AxisLabelFitMode.MultiLine;
categoricalAxis.MajorTickInterval = 4;
categoricalAxis.MajorTickOffset =1;
categoricalAxis.LabelInterval =4;
categoricalAxis.LabelOffset = 0;
categoricalAxis.LabelFormat = "#0";
categoricalAxis.LastLabelVisibility = AxisLastLabelVisibility.Visible;
chart.HorizontalAxis = categoricalAxis;
but, the chart is not produce the result as expected. it produce the result with decimal format (as it is plot value) image attached.
could you please suggest the solution.
I have a RadCartesianChart using a line axis and CategoricalAxis as HorizontalAxis. i want to represent the category axis whole integer format : 0 2 4 6 8.....
my code is
CategoricalAxis categoricalAxis = new CategoricalAxis();
categoricalAxis.LabelFitMode = AxisLabelFitMode.MultiLine;
categoricalAxis.MajorTickInterval = 4;
categoricalAxis.MajorTickOffset =1;
categoricalAxis.LabelInterval =4;
categoricalAxis.LabelOffset = 0;
categoricalAxis.LabelFormat = "#0";
categoricalAxis.LastLabelVisibility = AxisLastLabelVisibility.Visible;
chart.HorizontalAxis = categoricalAxis;
but, the chart is not produce the result as expected. it produce the result with decimal format (as it is plot value) image attached.
could you please suggest the solution.
0
Hello Senthil,
I see that you have already asked the same question in a different thread here. I will ask that you avoid duplicating the same questions because it makes it really hard to help and guide you and follow the communication.
Regards,
Petar Marchev
Telerik
I see that you have already asked the same question in a different thread here. I will ask that you avoid duplicating the same questions because it makes it really hard to help and guide you and follow the communication.
Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

ben
Top achievements
Rank 1
answered on 01 Jul 2015, 03:24 PM
Is there an update to this issue, or link to status? Has this been addressed in a later Telerik release?
Thanks!
0
Hi Ben,
As mentioned earlier, this is a duplicate question and it was discussed in a different thread. You can go through the other thread to find information. If you do not find what you are looking for you can open a new forum thread to ask your question.
Regards,
Petar Marchev
Telerik
As mentioned earlier, this is a duplicate question and it was discussed in a different thread. You can go through the other thread to find information. If you do not find what you are looking for you can open a new forum thread to ask your question.
Regards,
Petar Marchev
Telerik
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 Feedback Portal
and vote to affect the priority of the items