0

I guess this is a general c# question.

In the Chart control, if we add multiple series into a ChartArea, the system will render each curve (or bar) with a specific color. Obviously those colors are not randomly picked and always appear in a consistent order.

If the colors are not pre-defined by the user, then the Series.Color property remains unchanged from its default value, which is

  • Color "{Name=0, ARGB=(0, 0, 0, 0)}" System.Drawing.Color

which is obviously not what appears on the Chart.

My question is: how do I get/read those autofilled property values (Line color of a series in this case)?

Ji

uqji
  • 195
  • 1
  • 10
  • Look into `Chart.Palette` or `Chart.Series.Palette` properties. – jsanalytics Oct 13 '17 at 10:57
  • 2
    Thanks @jstreet. I didn't know there is a method called Chart.ApplyPaletteColors. It does exactly what I needed: Sets the automatically assigned series and data point colors, to allow programmatic access at run time. – uqji Oct 16 '17 at 07:01

0 Answers0