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

ItemLabelFormat

3 Answers 168 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Niclas Junsved
Top achievements
Rank 1
Niclas Junsved asked on 17 Mar 2010, 01:50 PM
Hi,

I modify the ItemLabelFormat for some specific DataPoints in a series like:

e.DataPoint.LabelFormat = "#VAL" + "\n" + "(" + labelValue + "%)";

In the default ItemLabelFormat values are displayed like for example:

2,77 bil

or

138,17 mil

I want the same format when I customize my ItemLabelFormat, i.e. I want to keep the "bil" and "mil" formatting and not show 277000000000 + my "labelValue". How do I achieve that?

I have tried different format expressions from help page but without any luck.

Best Regards,

Niclas


3 Answers, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 18 Mar 2010, 02:54 PM
Hello Niclas Junsved,

Try something like this: "#Y{0,,,.##} bil some string".

All the best,
Vladimir Milev
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
Simon Wolters
Top achievements
Rank 1
answered on 28 Apr 2010, 08:54 AM
Can we somehow "localize" the human readable format?
I'd like to display "t" instead of "k" and "mio" instead of "mil" and don't get how to do this using custom format expressions.

Thank you!
0
Vladimir Milev
Telerik team
answered on 30 Apr 2010, 11:11 AM
Hi Simon Wolters,

If you use the built-in human readable formats, there is no way to customize them. However, in your case with the "#Y{0,,,.##} bil some string" string, the "bil" part is just a regular text. It can be anything. The important part is only in the curly braces {}.

Greetings,
Vladimir Milev
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.
Tags
Chart
Asked by
Niclas Junsved
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Simon Wolters
Top achievements
Rank 1
Share this question
or