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

Setting custom axis measurement unit

2 Answers 89 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Kornelije
Top achievements
Rank 1
Kornelije asked on 25 Apr 2012, 08:26 AM

I have a data series which is in kW (unit of measurement).

When the value of the data point is more than several thousands, for example 3500, the graph switches to showing 3.5k on Y-axis, instead of 3500.

While 3.5k is the same thing as 3500, it is somewhat confusing for the user to have multiple prefixes/sufixes, 3.5k kW.

Is there an option to force the Y-axis to show full number (3500 in this case)?

Thanks

2 Answers, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 30 Apr 2012, 01:47 PM
Hi Kornelije,

You can control your datapoint labels by using the ItemLabelFormat property of your series like this:
line.SeriesDefinition.ItemLabelFormat = "#Y";

More information about label formatting can also be found here:
http://www.telerik.com/help/silverlight/radchart-features-format-expressions.html

Hope this helps.

Regards,
Peshito
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Petar
Top achievements
Rank 1
answered on 07 May 2012, 07:25 PM
Hello Kornelije,

Another way to this is by using LabelFormatBehavior. By default it is set to "HumanReadable" - which is exactly the behaviour you described. In order to force the chart to display the full number you should set it to None in your XAML code:
<telerikChart:radChart >
    <telerikChart:radChart.DefaultView>
        <telerikCharting:ChartDefaultView>
            ....
            <telerikCharting:ChartDefaultView.ChartArea>
                <telerikCharting:ChartArea LabelFormatBehavior="None">
                 ....

You can read more about this here.

I hope my answer was helpful :)
Kind Regards,
Petar
Tags
Chart
Asked by
Kornelije
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Petar
Top achievements
Rank 1
Share this question
or