C# dashed lines in chart series?

前端 未结 2 1888
你的背包
你的背包 2021-02-19 01:38

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

相关标签:
2条回答
  • 2021-02-19 01:43

    This changes slightly with Visual Studio 2010's version of chart control:

    this.chart1.Series["Data1"].BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Dash;

    0 讨论(0)
  • 2021-02-19 02:05

    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:

    enter image description here

    0 讨论(0)
提交回复
热议问题