C# MS Chart get series color

时间:2019-02-09 09:35:49

标签: c# winforms charts

I need to get color of Series in MS Chart. I try following:

    Color c = chart1.Series[1].Color;

But it is empty. Actual color is green.
I assume that it happens because I use palette for ChartArea.

Is there some way to get actual color of series? Or at least how to get color in that palette?

1 个答案:

答案 0 :(得分:-1)

Need to call chart1.ApplyPaletteColors(); before query color.