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

[Solved] RadChart

1 Answer 110 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Srikanthg
Top achievements
Rank 1
Srikanthg asked on 01 Apr 2009, 04:29 AM
Hi
   I am need some help in RadChart(pie chart).In pie chart i am having four parts and filled four parts with different colours. Now i need a legend for these four parts, beside that pie chart.In legend i wanna give corresponding colour part name

  How can i do this.

  Thanks
  Srikanth Gunnala

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Apr 2009, 10:38 AM
Hi Srikanth Gunnala,

I have one suggestion, you can define the custom color schema for the chart and use the same  color in the legent.

<rad:RadChart ID="RadChart1" runat="server" SeriesPalette="Palette1">    
                <Series>    
                    <rad:ChartSeries Name="Series 1" Type="Pie">    
                        <Appearance LegendDisplayMode="ItemLabels">    
                        </Appearance>    
                        <Items>    
                            <rad:ChartSeriesItem Name="Item 1" YValue="5">    
                            </rad:ChartSeriesItem>    
                            <rad:ChartSeriesItem Name="Item 2" YValue="6">    
                            </rad:ChartSeriesItem>    
                            <rad:ChartSeriesItem Name="Item 3" YValue="5">    
                            </rad:ChartSeriesItem>    
                            <rad:ChartSeriesItem Name="Item 4" YValue="3">    
                            </rad:ChartSeriesItem>    
                            <rad:ChartSeriesItem Name="Item 5" YValue="6">    
                            </rad:ChartSeriesItem>    
                            <rad:ChartSeriesItem Name="Item 6" YValue="6">    
                            </rad:ChartSeriesItem>    
                            <rad:ChartSeriesItem Name="Item 7" YValue="6">    
                            </rad:ChartSeriesItem>    
                        </Items>    
                    </rad:ChartSeries>    
                </Series>    
                <CustomPalettes>    
                    <rad:Palette Name="Palette1">    
                        <Items>    
                            <rad:PaletteItem MainColor="Red">    
                            </rad:PaletteItem>    
                            <rad:PaletteItem MainColor="Yellow">    
                            </rad:PaletteItem>    
                            <rad:PaletteItem MainColor="Lime">    
                            </rad:PaletteItem>    
                            <rad:PaletteItem MainColor="Cyan">    
                            </rad:PaletteItem>    
                            <rad:PaletteItem MainColor="Blue">    
                            </rad:PaletteItem>    
                            <rad:PaletteItem MainColor="Fuchsia">    
                            </rad:PaletteItem>    
                        </Items>    
                    </rad:Palette>    
                </CustomPalettes>    
            </rad:RadChart> 

Hope this helps a little.

-shinu.
Tags
Editor
Asked by
Srikanthg
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or