I’m writing a program in VB 6. Simply stated, I have several series of time/intensity pairs I would like to display as a graph, overlaying all series (note that each series does not necessarily have the same number of data points). Rather than generate the graphic from scratch, I thought I’d make use of the “MSChart” object which will do all the work once you load all the pertinent information into the asociated “data grid.”
Well, I wrote some code which extracts the information from the souce and stuffs it into the data grid. Problem is, the resultant graph only plots the last series, rather than overlaying all of them (I know for a fact that the information for all the series is in the datagrid). Is there some property setting or method that I am overlooking? The online help is somewhat sketchy.
Hmmm… I recently experimented with this control myself for the first time, and didn’t run into any problems like that - though I was working with the pie chart option, which I don’t think you were.
Did you make sure to set your rowcount and columncount properties correctly?
yes, although it may not have been done “properly.” In all of the examples given in the online help, it is implicitly assumed that you know the number of columns and rows in advance of setting up the datagrid. In my case, since the number of series (columncount, right?) that I wish to plot is not fixed, and the number of datapoints for each series (rowcount, right?) can vary, I am doing it “on the fly”:
When I encounter a new series, I increment the columncount by one. I then read in the datapoints, each time incrementing the rowcount then using the set command to enter the data. At the end, I think that I have a datagrid chock-full of information-I can call up a column/row from the datagrid and see a value, which means to me that the data is there… The only problem is that it’s not displayed…