You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As i am working a lot with wxGrid controls and wxFreeChart takes the data from the wxGrid control i am considering adding an additional class that can work directly with wxGridTableBase data.
In sort the wxGridTableBase holds all the data from the wxGrid and it also supports a message system to ack that data have been changed, that is useful for interactive charts also.
So i am wondering what i should base the new class? Should i derive from the dataset, dataseries or datapoint? The way that i did it in the old version of wxFreeChart is like AddSeries(wxGridTableBase*).
Can you suggest a proper way to do it with the new data structure?
The text was updated successfully, but these errors were encountered:
It would be very interesting to have an interface between wxFreeChart and wxGrid.
I think from our other discussions, this should be bi-directional, with the chart being updated dynamically in response to changing grid data and the grid being updated dynamically in response to user interactions with the chart.
As an initial thought, we need to consider what chart types are supported. Perhaps we should start with category-based charts (bar, pie, line) and XY scatter charts.
The interface will need to define the cells of the 'wxGrid' that represent the data. In the case of a category chart, one range of cells will represent the categories. With the new data structure (and the old one for that matter), further ranges of cells can represent the series data with one range representing one series.
For example, cell group (0,0) to (10,0) could represent the categories, (0,1) to (10, 1) could represent Series 1 and (0,2) to (10,2) could represent Series 2. This would use an UniDataSet with two DataSeries containing UniDataPoints.
At the moment, the convenience wrappers in UniDataSet are for read methods, but this is quite easy to extend to make them read-write. Already you can modify data via:
The convenience function would just simplify this to:
myUniDataSet->SetData(1, 4, 1234);
The trick will be linking a cell coordinate to a valid series and index (1 and 4 respectively in the above example). It may also help to write a new DataInterpreter to convert between text and double values.
Finally, the interface would need to subscribe to EVT_DATASET_CHANGED events for the UniDataSet, e.g.:
Hi,
As i am working a lot with wxGrid controls and wxFreeChart takes the data from the wxGrid control i am considering adding an additional class that can work directly with wxGridTableBase data.
In sort the wxGridTableBase holds all the data from the wxGrid and it also supports a message system to ack that data have been changed, that is useful for interactive charts also.
So i am wondering what i should base the new class? Should i derive from the dataset, dataseries or datapoint? The way that i did it in the old version of wxFreeChart is like AddSeries(wxGridTableBase*).
Can you suggest a proper way to do it with the new data structure?
The text was updated successfully, but these errors were encountered: