Bonjour,
Un nouvel exemple à adapter.
Cdlt.
Option Explicit
Public Sub TEST()
Dim ws As Worksheet
Dim pt As PivotTable
Dim ch As ChartObject
Dim X As Range, Y As Range
Dim LastRow As Long, lastCol As Long, I As Long, k As Long
Application.ScreenUpdating = False
Set ws = ActiveSheet
Set pt = ws.PivotTables(1)
Set ch = ws.ChartObjects(1)
With ch.Chart
Do While .SeriesCollection.Count > 0
.SeriesCollection(1).Delete
Loop
End With
LastRow = ws.Cells(Rows.Count, 1).End(xlUp).Row
lastCol = pt.TableRange1.Columns.Count
Set X = ws.Range(Cells(6, 1), Cells(LastRow, 1))
k = 1
For I = 2 To lastCol
ch.Chart.SeriesCollection.NewSeries
ch.Chart.SeriesCollection(k).XValues = X
Set Y = ws.Range(Cells(6, I), Cells(LastRow, I))
ch.Chart.SeriesCollection(k).Values = Y
k = k + 1
Next I
Set Y = Nothing: Set X = Nothing
Set ch = Nothing
Set pt = Nothing
Set ws = Nothing
End Sub