Dim Graphique As New ChartSpace
Dim Graph As ChChart = Graphique.Charts.Add()
With Graph
.Type = ChartChartTypeEnum.chChartTypeScatterLineMarkers
.HasLegend = False
.HasTitle = True
.Title.Caption = "Results of learner"
.Axes(0).HasTitle = True
.Axes(0).Title.Caption = "Results"
.Axes(1).HasTitle = True
.Axes(1).Title.Caption = "Exercices"
End With
' Ajout d'un graphique avec des valeurs bidon
Dim GraphSeries As ChSeries = Graph.SeriesCollection.Add(0)
GraphSeries.SetData(ChartDimensionsEnum.chDimSeriesNames, _
ChartSpecialDataSourcesEnum.chDataLiteral, "Score" )
GraphSeries.SetData(Owc11.ChartDimensionsEnum.chDimXValues, _
Owc11.ChartSpecialDataSourcesEnum.chDataLiteral, _
"01-2007" & vbTab & "02-2007" & vbTab & "03-2007" & vbTab & "04-2007" )
GraphSeries.SetData(Owc11.ChartDimensionsEnum.chDimYValues, _
Owc11.ChartSpecialDataSourcesEnum.chDataLiteral, _
Math.Floor(Rnd() * 10).ToString & vbTab & Math.Floor(Rnd() * 10).ToString & _
vbTab & Math.Floor(Rnd() * 10).ToString & vbTab & Math.Floor(Rnd() * 10).ToString)
Response.ContentType = "image/gif"
Response.BinaryWrite(Graphique.GetPicture("gif", 500, 400))
Response.End()