图表中的C#虚线? [英] C# dashed lines in chart series?

查看:733
本文介绍了图表中的C#虚线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#WinForms应用程序中使用.net 4.0的图表控件。
我有两个系列的数据显示为线图。

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.

我可以设置颜色

推荐答案

查看 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;

...给我:

>

这篇关于图表中的C#虚线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆