[英]How do I set the line colour in an MSChart?
I was wondering if someone could please show me sample code for setting the line colour in an MSChart using C#. 我想知道是否有人可以告诉我使用C#在MSChart中设置线条颜色的示例代码。
I know I can select a scheme form the options but I was wanting to pick my own colours for the different serie's I have shown. 我知道我可以从选项中选择一个方案,但我想为我所展示的不同系列选择自己的颜色。
Thank in advance 预先感谢
Chart1.Series["MySeries"].Color = System.Drawing.Color.FromArgb(113, 152, 203);
如果您更习惯于十六进制颜色:
chart1.Series["MySeries"].Color = System.Drawing.ColorTranslator.FromHtml("#001122");
此答案适用于Microsoft.Office.Interop.Graph.Chart
图表:
Chart1.SeriesCollection(1).Border.Color = Color.Orange;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.