C#中的虚线图表系列线? [英] C# dashed lines in chart series?
本文介绍了C#中的虚线图表系列线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的.NET 4.0在我的C#WinForms应用程序图表控件。
口有显示为线图的数据的两个系列
I'm using the Chart control from .net 4.0 in my C# WinForms app. I have two series' of data displayed as line graphs.
林作图基本上供需作为时间的函数。
我想要的需求是某种颜色的实线,和电源是相同颜色的虚线。
I'm graphing basically a supply and demand as a function of time. I want the demand to be a solid line of some colour, and the supply to be a dashed line of the same colour.
我可以设置颜色很好,但我找不到任何地方,我可以设置为虚线的线条样式。
I can set the colour fine, but I can't find anywhere where I can set the line style to be dashed.
推荐答案
查看的 DataPointCustomProperties.BorderDashStyle
财产。例如...
See the DataPointCustomProperties.BorderDashStyle
property. For example...
_chart.Series[1].Color = Color.Blue;
_chart.Series[0].Color = Color.Blue;
_chart.Series[0].BorderWidth = 3;
_chart.Series[0].BorderDashStyle = ChartDashStyle.Dash;
...给我:
...gives me:
这篇关于C#中的虚线图表系列线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文