OVH Cloud OVH Cloud

Ajouter une série à un graphique

1 réponse
Avatar
garnote
Bonsoir le monde,

J'ai un graphique contenant trois séries «nuage de
points avec lissage» dans lequel je veux ajouter
de gros points noirs. Pour ce faire, j'utilise cette macro :

Sub Ajoute()
Application.ScreenUpdating = False
Set nouvelle = Range("K7:L9")
nouvelle.Copy
With ActiveSheet.ChartObjects("graphe").Chart
.SeriesCollection.Paste Rowcol:=xlColumns, _
CategoryLabels:=True, NewSeries:=True
With .SeriesCollection(.SeriesCollection.Count)
.Border.LineStyle = xlNone
.MarkerBackgroundColorIndex = 1
.MarkerForegroundColorIndex = 1
.MarkerStyle = xlCircle
.MarkerSize = 5
End With
End With
End Sub

J'aimerais savoir si on peut obtenir le même résultat
avec SeriesCollection.Add .

Merci,

Serge

1 réponse

Avatar
j
une piste sur
http://jacxl.free.fr/cours_xl/cours_xl_jac.html#gr_vba
?


"garnote" a écrit dans le message de news:
za1Eb.2040$
Bonsoir le monde,

J'ai un graphique contenant trois séries «nuage de
points avec lissage» dans lequel je veux ajouter
de gros points noirs. Pour ce faire, j'utilise cette macro :

Sub Ajoute()
Application.ScreenUpdating = False
Set nouvelle = Range("K7:L9")
nouvelle.Copy
With ActiveSheet.ChartObjects("graphe").Chart
.SeriesCollection.Paste Rowcol:=xlColumns, _
CategoryLabels:=True, NewSeries:=True
With .SeriesCollection(.SeriesCollection.Count)
.Border.LineStyle = xlNone
.MarkerBackgroundColorIndex = 1
.MarkerForegroundColorIndex = 1
.MarkerStyle = xlCircle
.MarkerSize = 5
End With
End With
End Sub

J'aimerais savoir si on peut obtenir le même résultat
avec SeriesCollection.Add .

Merci,

Serge