1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| With Ch
With .SeriesCollection(1)
For i = 1 To UBound(SerieValues)
Debug.Print SerieValues(i)
.Points(i).Select
Set MyPoint = Selection
With MyPoint
If .HasDataLabel = False Then .HasDataLabel = True
If SerieValues(i) >= 2 Then
Ch.SeriesCollection(1).Points(i).Select
With Selection.Format.Fill
.ForeColor.RGB = RGB(0, 176, 80)
.HasDataLabel = False
End With
ElseIf SerieValues(i) = 1 Then
Ch.SeriesCollection(1).Points(i).Select
With Selection.Format.Fill
.ForeColor.RGB = RGB(255, 153, 51)
.HasDataLabel = False
End With
ElseIf SerieValues(i) = 0 Then
Ch.SetElement (msoElementDataLabelCenter)
.DataLabel.Select
With Selection.Format.TextFrame2.TextRange.Font.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0
.Solid
End With
Selection.Format.TextFrame2.TextRange.Font.Italic = msoTrue
End If
End With
Next i
End With
With .FullSeriesCollection(2).Select
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(0, 112, 192)
.Transparency = 0
End With
End With
End With |
Partager