Sub add_graph10()
Dim aa As ChartObject
Application.ScreenUpdating = False
'creer le graphique sur la feuille analyse
Set aa = Worksheets("Analyse").ChartObjects.Add(30, 50, 460, 235)
aa.Chart.ChartWizard Source:=Worksheets("analyse").Range("A10:B12"), gallery:=xlLine
aa.Chart.ChartType = xlColumnClustered 'type de graphique
nom10 = aa.Name
'mise en forme du graphique
With aa.Chart
.ChartArea.Border.ColorIndex = 57
.ChartArea.Border.Weight = 3
.ChartArea.Border.LineStyle = 1
.ChartArea.Interior.ColorIndex = 2
.ChartArea.Interior.PatternColorIndex = 1
.ChartArea.Interior.Pattern = 1
.PlotArea.Interior.ColorIndex = 2
'enlever les champs
.HasPivotFields = False
.HasTitle = False
.HasLegend = False
.HasAxis(xlCategory, xlPrimary) = False
.HasAxis(xlValue, xlPrimary) = True
.ApplyDataLabels AutoText:=True, ShowSeriesName:=True
.SeriesCollection(1).DataLabels.Position = xlLabelPositionInsideBase
End With
End Sub