Why does the following have no effect?
chart.PlotArea.YAxis.Appearance.Color = System.Drawing.Color.Black;
I'm trying to set the X and Y axis to appear in black text. But they still appear in the default gray'ish color.
any ideas?
thx
5 Answers, 1 is accepted
As you talk about "appear in black text", I assume you want to change the color of the axis items and not the color of the Axis itself:
chart.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Black;
Kind regards,
Steve
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >
The attached image still does not make it very clear which lines you talk about, so here is the code to make all Black. If this is not what you want, please use some pointers in the screenshot or say exactly which chart element you aim for as described in Chart Elements help article.
chart1.PlotArea.YAxis.Appearance.Color = System.Drawing.Color.Black;
chart1.PlotArea.YAxis.Appearance.MajorTick.Color = System.Drawing.Color.Black;
chart1.PlotArea.YAxis.Appearance.MinorTick.Color = System.Drawing.Color.Black;
chart1.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Black;
chart1.PlotArea.XAxis.Appearance.MajorTick.Color = System.Drawing.Color.Black;
chart1.PlotArea.XAxis.Appearance.MinorTick.Color = System.Drawing.Color.Black;
chart1.PlotArea.YAxis.Appearance.MajorGridLines.Color = System.Drawing.Color.Black;
chart1.PlotArea.YAxis.Appearance.MinorGridLines.Color = System.Drawing.Color.Black;
chart1.PlotArea.XAxis.Appearance.MajorGridLines.Color = System.Drawing.Color.Black;
chart1.PlotArea.XAxis.Appearance.MinorGridLines.Color = System.Drawing.Color.Black;
Regards,
Steve
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

My axis lines are still gray... The tick marks and text are black now.
I also need the vertical grid line to show.
thanks again
Attached you can find a movie which demonstrates Chart Axes formatting with the designer instead of programmatic setup.
Kind regards,
Hrisi
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >