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

how to control data unit of radchart

2 Answers 56 Views
Chart
This is a migrated thread and some comments may be shown as answers.
B
Top achievements
Rank 1
B asked on 17 Sep 2012, 11:33 AM
i use barchart in my project and bind it to data source

then the chart display data in K(kilo) and other units

how can i control or disable this behavior

thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Petar Marchev
Telerik team
answered on 20 Sep 2012, 06:58 AM
If you are talking about the human readable formatting (k, mil, bil, tri) then you can simply disable it by setting the LabelFormatBehavior property of the ChartArea to None:
this.radChart1.DefaultView.ChartArea.LabelFormatBehavior = LabelFormatBehavior.None;

To control the axis-labels formatting you can use the DefaultLabelFormat property of the axis:
this.radChart1.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "#VAL"; // "#VAL{#,, millions}";

To control the item-labels formatting you need to use the ItemLabelFormat of the series definition:
this.radChart1.SeriesMappings[0].SeriesDefinition.ItemLabelFormat = "#Y{C2}";

References:
Format Expressions

Kind regards,
Petar Marchev
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
B
Top achievements
Rank 1
answered on 20 Sep 2012, 09:49 AM
thanks for help
Tags
Chart
Asked by
B
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
B
Top achievements
Rank 1
Share this question
or