Change color of bar in bar chart

Thread is closed for posting
2 posts, 0 answers
  1. Ufuoma
    Ufuoma avatar
    5 posts
    Member since:
    Nov 2012

    Posted 30 Nov 2012 Link to this post

    Please how can I change the color of the bars of the telerik barchart.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Nov 2012 Link to this post


    Please check the following code snippet I tried to assign different colors for the Bar Chart.

    <telerik:RadChart ID="RadChart1" SkinsOverrideStyles="true" runat="server">
            <XAxis MaxValue="5" MinValue="1" Step="1">
            <YAxis MaxValue="3" Step="0.5" AxisMode="Extended">
            <YAxis2 MaxValue="5" MinValue="1" Step="1">
            <telerik:ChartSeries Name="Series 1">    
                    <telerik:ChartSeriesItem YValue="1" Name="Item 1">
                    <telerik:ChartSeriesItem YValue="2" Name="Item 2">
                    <telerik:ChartSeriesItem YValue="1" Name="Item 3">
                    <telerik:ChartSeriesItem YValue="3" Name="Item 4">
                    <telerik:ChartSeriesItem YValue="2" Name="Item 5">

    protected void Page_Load(object sender, EventArgs e)
        Color[] barColors = new Color[5]{
    if (!IsPostBack)
        int i = 0;
        foreach (ChartSeriesItem item in RadChart1.Series[0].Items)
            item.Appearance.FillStyle.MainColor = barColors[i++];

    Please take a look into this help documentation.

  3. DevCraft R3 2016 release webinar banner
Back to Top