Schadenfreud
New Member
- Joined
- Jan 22, 2014
- Messages
- 29
I'm using this code to split a series line into 2 overlapping parts, so I can use different styles on them:
This is how the line looks before I run the code:
And this is how it looks afterwards:
I think it prints mirrored. Can I get a mirror image of the 2nd line?
Code:
Sub backfillDataSeries()
'make new series in Port Historical Risk
'if there is a backfill date in Rolling window data
Dim cRange As Range
Dim i As Integer
For i = 3 To 122
Set cRange = Sheet24.Cells(i, 4) 'Sheet 24 - Rolling_window_data
If IsNumeric(cRange.Value) And Not IsEmpty(cRange.Value) And Not IsError(cRange.Value) Then 'iterate through range D3:D122
With Sheet49.ChartObjects("Chart 4").Activate
With ActiveChart.SeriesCollection(1) 'Sheet 49 - Port Historical Risk
.Values = "=Rolling_window_data!$B$3:$B$" & i
.XValues = "=Rolling_window_data!$A$3:$A$" & i
End With
With ActiveChart.SeriesCollection.NewSeries
.Values = "=Rolling_window_data!$B$" & i & ":$B$122"
.XValues = "=Rolling_window_data!$A$" & i & ":$A$122"
.Name = "Backfilled"
.Format.Line.DashStyle = msoLineDash
End With
End With
Exit For
End If
Next i
End Sub
And this is how it looks afterwards:
I think it prints mirrored. Can I get a mirror image of the 2nd line?