New to Telerik UI for WinForms? Start a free 30-day trial
How Do I Assign Individual Colors to Bars?
Updated over 1 year ago
"I need each bar in a bar chart to be a different color. How do I do this?"
By default RadChart is designed so that all bars from a series have the same colors. If you need each to have a different color, loop through each chart series item and assign them a color from an array. This should be done after binding the chart, so the chart series items are available.

C#
void Form1_Load(object sender, EventArgs e)
{
Color[] barColors = new Color[8]{
Color.Purple,
Color.SteelBlue,
Color.Aqua,
Color.Yellow,
Color.Navy,
Color.Green,
Color.Blue,
Color.Red
};
int i = 0;
radChart1.DataSource = "..\\..\\Chart\\ChartXML.xml";
radChart1.DataBind();
radChart1.Series[0].Name = "Units by Category";
foreach (ChartSeriesItem item in radChart1.Series[0].Items)
{
item.Appearance.FillStyle.MainColor = barColors[i++];
}
}