Ok, thanks Tushar.
Here is the result to write labels on the graph :
(I get the label from a comment on the cell)
================================
iPlotAreaInsideWidth = ActiveChart.PlotArea.InsideWidth
iPlotAreaInsideHeight = ActiveChart.PlotArea.InsideHeight
vYMax = ActiveChart.Axes(xlValue, CInt(sYAxe)).MaximumScale
iIndexMax = UBound(ActiveChart.SeriesCollection(iSeriesIndex).Values)
iIndex = 1
For Each oCell In oRange
If Not (oCell.Comment Is Nothing) Then
vYTemp = oCell.Value
iXlabel = iIndex * iPlotAreaInsideWidth / iIndexMax
iYlabel = ((vYMax - vYTemp) * iPlotAreaInsideHeight /
vYMax) - 10
DrawComment oCell.Comment.Text, iXlabel, iYlabel, 10
End If
iIndex = iIndex + 1
Next oCell
....
Function DrawComment(ByVal strTexte, intX, intY, intFontSize)
Dim myChar As Object
Set myChar = ActiveChart.Shapes.AddLabel(msoTextOrientationHorizontal,
intX, intY, 0#, 0#) _
.TextFrame.Characters
With myChar
.Text = strTexte
.Font.Name = "Arial"
.Font.FontStyle = "Normal"
.Font.Size = intFontSize
.Font.ColorIndex = xlAutomatic
End With
End Function
================================
It works fine.
Regards
Rad.