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

dynamic legend for radchart

1 Answer 98 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Rusty
Top achievements
Rank 1
Rusty asked on 08 Feb 2012, 04:05 PM
I have tied my chart to a sqldatasource.  But I can't get the legend to reflect the the categories showing up.  Can someone show me an example or a demo where the legend reflects the categories in a sqldatasource?

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 09 Feb 2012, 05:49 PM
Rusty:

Maybe I'm misinterpreting your requirement, but I believe your requirement is covered in the Chart/Database online demo.

The legend is configured to dynamically display the categories from the data source. See the description:

The above charts are databound to a SqlDataSource Control.
The first chart shows how to display the results from different categories, grouped by the category name. The X axis labels show the corresponding years. The RadChart1.Legend.Appearance.GroupNameFormat is set to "#VALUE" so the legend items display the actual category name. More details about this property are available in this help topic.


Hope this helps!
Tags
Chart (Obsolete)
Asked by
Rusty
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or