I was wondering if anyone could show me a sample code to set the line color in MSChart using C #.
I know that I can choose the shape of the form, but I wanted to choose my own colors for the different series that I showed.
thanks in advance
Chart1.Series["MySeries"].Color = System.Drawing.Color.FromArgb(113, 152, 203);
If you are more used to hex colors:
chart1.Series["MySeries"].Color = System.Drawing.ColorTranslator.FromHtml("#001122");
This answer applies to diagrams from Microsoft.Office.Interop.Graph.Chart:
Microsoft.Office.Interop.Graph.Chart
Chart1.SeriesCollection(1).Border.Color = Color.Orange;