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

One series with multiple legends

3 Answers 97 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Prabodh
Top achievements
Rank 1
Prabodh asked on 25 May 2009, 10:16 AM
Hi,

I am new to RAD controls. I am using RadChart control and facing one problem.

I am having one chart control of type pie on the form with only one series containing 4 items. I want to show four legends at the right side with same color as that of each item in the chart. Legend color should be associated with series item.

can somebody help me on this?
also how to change color of particular item in the series? This changed color should reflect to associated series item.

please treat this as urgent.

Thanks and regards,
Prabodh

3 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 27 May 2009, 07:31 AM
Hi Prabodh,

Here is a sample code:
// Change the legend display mode of the first series: 
this.radChart1.Series[0].Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.ItemLabels; 
 
// Change the appearance of the first item in the first series: 
this.radChart1.Series[0][0].Appearance.FillStyle.MainColor = Color.Red; 
this.radChart1.Series[0][0].Appearance.FillStyle.SecondColor = Color.DarkRed; 

Best,
Evtim
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Prabodh
Top achievements
Rank 1
answered on 27 May 2009, 08:59 AM
Thanks Evtim,

I got it worked now.

One more question.  Legends are appearing on the pie chart itself. I mean inside the box that appears around the graph. 

Can I move it outside that box?

Thanks and regards,
Prabodh
0
Dwight
Telerik team
answered on 29 May 2009, 07:02 AM
Hi Prabodh,

Unfortunately, the legend is part of the RadChart and cannot be moved outside.

All the best,
Evtim
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart (obsolete as of Q1 2013)
Asked by
Prabodh
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Prabodh
Top achievements
Rank 1
Share this question
or