Hi, i am a newbie when it comes to using MSChart. I have sucessfully managed to create Pie Charts, but i want to create a 'time'line graph which will display time across the bottom and just have numbers going up the side.
My SQL query brings back the following data :
'+--------+-----------+--
'| date |COUNT (companycount)
'+--------+-----------+-
'| 200311 | 9
'| 200312 | 2
'| 200402 | 12
'+--------+-----------+-
As 12 is the highest count, i want this to be on the veritcal axis, then a point plotted for each month of the year.
The graph code is
With chtTimeLine
Set .DataSource = adoRS
.chartType = VtChChartType2dLine
.ColumnCount = colCnt 'count of records in recordset ??
.RowCount = 1
adoRS.MoveFirst
For Column = 1 To colCnt
.Column = Column
.ColumnLabel = adoRS.Fields("date")
.Data = adoRS.Fields("companycount") 'problem??
adoRS.MoveNext
Next Column
.ShowLegend = True
.EditCopy
.EditPaste
adoRS.Close
Please can someone tell me what's going wrong.
Thanks,
Itsari
My SQL query brings back the following data :
'+--------+-----------+--
'| date |COUNT (companycount)
'+--------+-----------+-
'| 200311 | 9
'| 200312 | 2
'| 200402 | 12
'+--------+-----------+-
As 12 is the highest count, i want this to be on the veritcal axis, then a point plotted for each month of the year.
The graph code is
With chtTimeLine
Set .DataSource = adoRS
.chartType = VtChChartType2dLine
.ColumnCount = colCnt 'count of records in recordset ??
.RowCount = 1
adoRS.MoveFirst
For Column = 1 To colCnt
.Column = Column
.ColumnLabel = adoRS.Fields("date")
.Data = adoRS.Fields("companycount") 'problem??
adoRS.MoveNext
Next Column
.ShowLegend = True
.EditCopy
.EditPaste
adoRS.Close
Please can someone tell me what's going wrong.
Thanks,
Itsari