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

Bar chart bar colors

1 Answer 106 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
M Mayo
Top achievements
Rank 1
M Mayo asked on 22 Jul 2008, 01:54 PM
Where/What is the property to set the bar color on a bar chart? I have been hunting around and have tried several different ways to set it in the code behind to no avail.

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 22 Jul 2008, 03:51 PM
Hello M Mayo,

You can customize the color via ChartSeries.Appearance.FillStyle.MainColor / SecondColor properties for all bar series items, or alternatively via ChartSeriesItem.Appearance.FillStyle.MainColor / SecondColor properties for individual series items:

<telerik:RadChart ID="RadChart1" runat="server"
    <Series> 
        <telerik:ChartSeries Type="Bar"
            <Appearance> 
                <FillStyle MainColor="Green" SecondColor="White" FillType="Gradient"
                </FillStyle> 
            </Appearance> 
            <Items> 
                <telerik:ChartSeriesItem YValue="10" /> 
                <telerik:ChartSeriesItem YValue="-20"
                    <Appearance> 
                        <FillStyle MainColor="Red" FillType="Solid"
                        </FillStyle> 
                    </Appearance> 
                </telerik:ChartSeriesItem> 
                <telerik:ChartSeriesItem YValue="40" /> 
            </Items> 
        </telerik:ChartSeries> 
    </Series> 
</telerik:RadChart> 



Greetings,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
M Mayo
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or