Hi
I'm trying to implement the ChartDrawItemEvent event so that I can draw custom colours on my chart (ColorModel isn't flexible enough for my needs). But the e.Primitive DataPoint property is always null. How do I set that in code? and what value do I need to assign?
Thanks
DataPoint property will be null for most scenarios, except when the primitive represents a single data point. For example, for a column chart, each box represents one datapoint, so DataPoint property will be set. For a line chart a polyline primitive consists of more than one data point, therefore DataPoint property is null and you have to look into the Points collection of the polyline to get the points. I'm not sure why you need the DataPoint property to be set. Have you tried using CustomSkin at your color model?
Thanks for the information. How do I use the CustomSkin? I would like to use certain colours that I have for each type of data point. Each data point has a property called Style (of which there are many) and i would like to use a specific color for each one. My attempts at using the ColorModel have so far been unsuccessful, mainly because the style property is not the data value of the point.