如何在vb.net中以虚线图(同一行)继续法线?

时间:2017-04-28 05:48:56

标签: vb.net

我希望我的法线在char中以虚线继续。我有上面的图表: enter image description here

绿线我想在2017/18继续绿色并破灭,但从同一条线继续。

我的代码就是:

Dim OpenApu As New Series
            Dim ClosedApu As New Series
            Dim TargetWorkingAverage As New Series

            OpenApu.Name = "Sum of APU units open"
            ClosedApu.Name = "Sum of APU units closed"
            TargetWorkingAverage.Name = "Target Working Average"

            OpenApu.ChartType = SeriesChartType.Line
            ClosedApu.ChartType = SeriesChartType.Line
            TargetWorkingAverage.ChartType = SeriesChartType.Line

            OpenApu.Color = System.Drawing.Color.Green
            OpenApu.BorderWidth = 3

            ClosedApu.Color = System.Drawing.Color.Blue
            ClosedApu.BorderWidth = 3

            TargetWorkingAverage.Color = System.Drawing.Color.Black
            TargetWorkingAverage.BorderWidth = 3
            TargetWorkingAverage.BorderDashStyle = ChartDashStyle.Dash
            TargetWorkingAverage.ChartType = SeriesChartType.StepLine
' this i put my values from chart
ClosedApu.Points.AddXY(DateTime.Now.Year & "/" & i + 1, TotalCost2)

我尝试的是,在最后一行改变虚线的线条样式但改变所有线条的风格。

    OpenApu.Color = System.Drawing.Color.Blue
    OpenApu.BorderWidth = 3
    OpenApu.BorderDashStyle = ChartDashStyle.Dash
    OpenApu.ChartType = SeriesChartType.StepLine

    ClosedApu.Color = System.Drawing.Color.Green
    ClosedApu.BorderWidth = 3
    ClosedApu.BorderDashStyle = ChartDashStyle.Dash
    ClosedApu.ChartType = SeriesChartType.StepLine

    OpenApu.Points.AddXY(DateTime.Now.Year & "/" & i + 1, 5000)
    ClosedApu.Points.AddXY(DateTime.Now.Year & "/" & i + 1, 6000)

当试图更改dahsed中的样式时,我的所有行都是破了,但是我想继续下去并不是我的所有行都是虚线。

0 个答案:

没有答案