- Code: Select all
IChartSerie series1 = chart.Series[0];
series1.Format.Fill.FillType = ShapeFillType.SolidColor;
series1.Format.Fill.ForeColor = System.Drawing.Color.FromArgb(15, 86, 136);
IChartSerie series2 = chart.Series[1];
series2.Format.Fill.FillType = ShapeFillType.SolidColor;
series2.Format.Fill.ForeColor = System.Drawing.Color.FromArgb(0, 173, 202);
IChartSerie series3 = chart.Series[2];
series3.Format.Fill.FillType = ShapeFillType.SolidColor;
series3.Format.Fill.ForeColor = System.Drawing.Color.FromArgb(165, 208, 107);
Everything seems to run fine except that instead of the RGB values I specify in the code, the ForeColor on the series are being set to rgb(0, 128, 128), rgb(0, 102, 204), and rgb(150, 150, 150) respectively. Is there anyway to make these objects accept the specific color values I set them to?