Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
ChartDrawItemEvent
posted

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

Parents
  • 26458
    Verified Answer
    Offline posted

    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?

Reply Children