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
|
Dim Column As Integer, Row As Integer, valeur As Double
Dim index1, index2, index3, index4
With MSChart2
' Affiche un graphique en 2d en ligne avec NbrLgn colonnes et
' 3lignes de données.(x,y,z)
.chartType = VtChChartType2dLine
.ColumnCount = 3
.RowCount = NbrLgn
.DataGrid.ColumnLabel(1, 1) = MonTableau(0).LeData(0)
.DataGrid.ColumnLabel(2, 1) = MonTableau(0).LeData(1)
.DataGrid.ColumnLabel(3, 1) = MonTableau(0).LeData(2)
For Column = 1 To 3
For Row = 1 To NbrLgn
valeur = Val(MonTableau(Row).LeData(Column - 1))
.Column = Column
.Row = Row
.Data = valeur
Next Row
Next Column
' Utilise le graphique comme fond de la légende.
.ShowLegend = True
.SelectPart VtChPartTypePlot, index1, index2, _
index3, index4
.EditCopy
.SelectPart VtChPartTypeLegend, index1, _
index2, index3, index4
.EditPaste
End With |
Partager