Colors inside pie chart

Thread is closed for posting
2 posts, 0 answers
  1. vikram
    vikram avatar
    11 posts
    Member since:
    Oct 2008

    Posted 12 Mar 2009 Link to this post

    Hi,
        I am using pie chart for report. How can I change the color of the strips inside circle of the pie chart? Can we change the custome color as per the label ?

    Thanks
    Vikram

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 16 Mar 2009 Link to this post

    Hello vikram,

    There are two ways change the appearance of each slice using the pie chart series.

    First one is to set CustomPalletes property and  then point the name of the newly created Palette to the 'SeriesPallete' property.

            <telerik:RadChart ID="RadChart1" runat="server" SeriesPalette="Palette1"
            <CustomPalettes> 
                    <telerik:Palette Name="Palette1"
                        <Items> 
                            <telerik:PaletteItem MainColor="Green" SecondColor="Lime"
                            </telerik:PaletteItem> 
                            <telerik:PaletteItem MainColor="Red" SecondColor="Pink"
                            </telerik:PaletteItem> 
    ...... 

    Second way to achieve this is to set the MainColor and (optionally SecondColor and FillStyle) properties for each slice:

                    <telerik:ChartSeries Type="Pie"
                        <Items> 
                            <telerik:ChartSeriesItem Name="Item 1" YValue="100"
                                <Appearance> 
                                    <FillStyle FillType="Gradient" MainColor="Green" SecondColor="Lime"
                                    </FillStyle> 
                                </Appearance> 
                            </telerik:ChartSeriesItem> 
                            <telerik:ChartSeriesItem Name="Item 2" YValue="200"
                                <Appearance> 
                                    <FillStyle FillType="Gradient" MainColor="Red" SecondColor="Pink"
                                    </FillStyle> 
                                </Appearance> 
                            </telerik:ChartSeriesItem> 
     

    Hope this helps.

    Kind regards,
    Ves
    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.
Back to Top