I am trying to plot some data values against a set of text labels. Basically the Y value is numeric and the X value is a label. So my data might look like:
XValue YValue
-------- --------
Cats 25
Dogs 15
Newts 14
The X and Y values are in an ado recordset. I am sure this is easy but I can't seem to find how to do it. Any advice?
Plotting numeric YValues agaisnt a set of text labels
Hello,
See the TeeChart Visual Basic 'ADO Databases' example under the VB Examples folder.
eg. syntax:
LabelsSource would in this case point to your X data.
Regards,
Marc Meumann
Steema Support
See the TeeChart Visual Basic 'ADO Databases' example under the VB Examples folder.
eg. syntax:
Code: Select all
Dim Data As New ADODB.Connection
Dim Record As New ADODB.Recordset
' Open the sample table and database...
' The "TeeChart Pro Database" ODBC DSN is
' automatically added when installing TeeChart Pro...
Data.Open "TeeChart Pro Database"
Record.Open "employee", Data, 1, 1
' Retrieve records....
TChart1.Series(0).Clear
TChart1.Series(0).DataSource = Record
TChart1.Series(0).YValues.ValueSource = Record.Fields(1).Name
TChart1.Series(0).LabelsSource = Record.Fields(0).Name
Regards,
Marc Meumann
Steema Support
Hello,
Thanks for the comments. There are some pointers to db access in the Tutorials (see Tutorial 8 - ADO Database access). The UserGuide is included in the online helpfile (best to look at the contents of the helpfile for section breakdown). Please check the 'information sources' document as a summary of these and other help sources and of how best to search the TeeChart example projects for any clues you might need.
All the above help sources are available via the TeeChart Program Manager menu group.
Regards,
Marc Meumann
Steema Support
Thanks for the comments. There are some pointers to db access in the Tutorials (see Tutorial 8 - ADO Database access). The UserGuide is included in the online helpfile (best to look at the contents of the helpfile for section breakdown). Please check the 'information sources' document as a summary of these and other help sources and of how best to search the TeeChart example projects for any clues you might need.
All the above help sources are available via the TeeChart Program Manager menu group.
Regards,
Marc Meumann
Steema Support