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

DataBinding Questions

1 Answer 58 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Amir
Top achievements
Rank 1
Amir asked on 07 Jan 2009, 06:59 PM
Hello,

I had a question i am creating a bar chart and and i have a Collection of keyValuepair of strings and double like so

I

ICollection<KeyValuePair<stringdouble>> topCompanies = new List<KeyValuePair<stringdouble>>(); 

now what i want to happen is for bar chart to show me the string value in KeyValuePair on xAxis and the double value on yAxies

now the yAxies is binding fine, but xAxis is not showing the string value its showing 1.2.3....

how can i accomplish this ?

Also to addition to this how can i apply .NET formattings to the double values like if i want 128.01 to display as $128.01 in chart?

Thanks,
Amir

1 Answer, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 09 Jan 2009, 08:33 AM
Hi Amir,

Please, find attached a sample page, showing this functionality. The labels formatting is discussed in more details in this help topic. Note, that you can set the ChartSeries.DefaultLabelValue property after the chart series is created i.e. after the chart is databound.

Kind regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Amir
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or