How to change radchart bar color for a skin

2 posts, 0 answers
  1. Zash
    Zash avatar
    39 posts
    Member since:
    Aug 2005

    Posted 09 Jan Link to this post

    Hi,

    I am using Telerik version 2010.3.1317.35.
    In my Radchart i have 6 diferent bars. I want to set different color for each bar.
    I am using skin "Hay" and it works fine. Issue with my customers that they don't like the bar color.

    Is there any settings/configurations to change the bar color or i have to do programmatically.

    Many Thanks
     

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    699 posts
    Member since:
    Nov 2012

    Posted 14 Jan Link to this post

    Hi Zash,

    You can use Appearance-FillStyle-MainColor property for each series item in order to set a color for this item. For example:

    <telerik:RadChart ID="RadChart1" runat="server" Skin="Hay" Width="600" Height="400">
        <Series>
            <telerik:ChartSeries>
                <Items>
                    <telerik:ChartSeriesItem YValue="30" Appearance-FillStyle-MainColor="Red"></telerik:ChartSeriesItem>
                    <telerik:ChartSeriesItem YValue="10" Appearance-FillStyle-MainColor="Blue"></telerik:ChartSeriesItem>
                    <telerik:ChartSeriesItem YValue="20" Appearance-FillStyle-MainColor="Green"></telerik:ChartSeriesItem>
                    <telerik:ChartSeriesItem YValue="30" Appearance-FillStyle-MainColor="Red"></telerik:ChartSeriesItem>
                    <telerik:ChartSeriesItem YValue="10" Appearance-FillStyle-MainColor="Blue"></telerik:ChartSeriesItem>
                    <telerik:ChartSeriesItem YValue="20" Appearance-FillStyle-MainColor="Green"></telerik:ChartSeriesItem>
                </Items>
            </telerik:ChartSeries>
        </Series>
    </telerik:RadChart>

    I have tried this approach and it works properly on my side with the latest version of RadControls - 2013.3.1114 as well as with version 2010.3.1317.

    Regards,
    Danail Vasilev
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.

Back to Top