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

DataLabelsColumn Custom Format

4 Answers 112 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Mahmoud
Top achievements
Rank 1
Mahmoud asked on 01 Feb 2012, 06:36 AM
Hi,

I have a simple RadChart in my application , but I have a little issue which is:

I have DataLabelsColumn as Number Rtrieved from Database & I don't know how to set a Custom Format to it Like

Percent Format and how to put an Appearance also . 
 
Please can anybody help me with this ...

Regarding,
Mahmoud

4 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 03 Feb 2012, 08:40 AM
Hi,

To see more information along the lines of the formatting issue, please refer to the following article:

http://www.telerik.com/help/aspnet-ajax/radchart-axis-labels.html

Additionally, another option is to access the textblocks along the axis, and set the text directly, if none of the format strings are applicable.
I hope these options are applicable for you.

Regards,
Yavor
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Mahmoud
Top achievements
Rank 1
answered on 05 Feb 2012, 11:36 AM
Thanks Yavor,

I figured out what I really want is Series Item Labels 

Can you tell me how to put a format for it ????
I can put appearance for it very easily But I can't see anyway to put a custom format for it.

I'm really stuck here,
Can you help me with this problem .

Best Regards,
Mahmoud
0
Mahmoud
Top achievements
Rank 1
answered on 06 Feb 2012, 07:33 AM
Hi,

I was able to do this finally programmatically from code-behing 

Using FormatCurrency Function

RadChart1.Chart.Series(0).Items(item).Label.TextBlock.Text = FormatCurrency(DirectCast(chartDS.Tables(0).Rows(item).Item("Profit"), Integer), 0, TriState.False, TriState.False,).ToString()


Thanks

Best Regarding,
Mahmoud
0
Accepted
Evgenia
Telerik team
answered on 08 Feb 2012, 09:43 AM
Hi Mahmoud,

We are glad that you figured this out on your own. Aside from your solution here's how you can do this - for formatting purposes RadChart exposes the DefaultLabelValue property. You can read more about it in our help topic.

Greetings,
Evgenia
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Chart (Obsolete)
Asked by
Mahmoud
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Mahmoud
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or