Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSChart - Help!

Status
Not open for further replies.

Itsari

Programmer
Mar 28, 2004
9
0
0
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top