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
595
Color values on a line chart
posted

Can someone please suggest a way to color values (data points text primitives?) on a line chart? I attempted to override chart_ChartDrawItem() and setting e.Primitive.PE.Fill = color; but that colors all text primitives including axis labels and values. I need to color only values. Thanks for your input.

  • 26458
    Offline posted

    it should be sufficient to check the Path property of the text primitive and make sure it's equal to null. Axis labels have the Path set to something like "Border.Title.Grid.X". ChartText labels have the Path set to null.