Color individual Points in Chart Series?

G

Graham Epps

Hello.
I am drawing a small 3D bar chart (4 series of 5 points each = 20 data
points), the hight of each point represents the number of items of that
type. The application has strict color associations for each data point, so
my question is - can I set the color for each individual data point in a
graph? I can set the color of each series, but I cannot see how to set each
point in the series.
Can anyone help?
Thank you very much.
G.
 
A

Alvin Bruney [MVP]

you will want to look at the chPoint object attached to the series
collection. then you can retrieve the interior object associated with the
chPoint followed by the color property

ChPoints p = objChart.SeriesCollection[0].Points;

p[0].Interior.Color = Color.Red;

rough example to color the first point red.
 
G

Graham Epps

Thank you very much. That all makes perfect sense. I will try it
immediately!
G.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top