Quantcast

wxFreeChart - Request for Opinions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wxFreeChart - Request for Opinions

Iwbnwif Yiw
I am working on some updates to a cloned version of wxFreeChart (the original is on wxCode).

This isn’t going to be a too major overhaul as I will be ‘time boxing’, but I hope to fix some bugs and make some significant improvements.

My main aims are:
  • Improve the Doxygen documentation
  • ‘Modernise’ the chart presentation to be more akin to charts produced by current office software
  • Improve drawing speed for dynamic charts (30fps for 500 datapoints on average hardware)
  • Make charts interactive, showing tooltips when hovering over data points and issuing events
For this last part, I have been thinking about a couple of things which I would welcome opinions on.

Dataset / Serie(s) / Axis Classes

Currently there is quite a large number of Dataset derivatives most of which are a subtle subclassing of XYDataset.

My thought is to rationalize this to have 3 Dataset subclasses as follows:
  1. SingletonDataset
  2. PairDataset
  3. TupleDataset
A dataset is a container for data Series, and these have related Axis and Renderer. So a SingletonDataset can only sensibly contain a SingletonSeries and so on.

A SingletonSeries is a series where the datapoints are singletons, say the ‘Y’ value, whilst the ‘X’ value is a fixed category set defined by the dataset. A singleton could sensibly be plotted as a line, a moving average, bars, even a pie-chart with no categories. The existing CategorySimpleDataset / CategorySerie would be replaced by this.

A PairSeries would contain an ‘X’ and a ‘Y’ value. These make more sense to plot as a XY Scatter Chart or a histogram. The existing series for XYSimpleDataset, VectorDataset, XYDynamicDataset and others would be replaced by this.

A TupleSeries would be for data that has more than just X and Y values. Probably, it would derive from PairSeries but with a vector member that can store 1 or more additional dimensions, so XYZSeries and a new OHLCSeries would fit here.

I was thinking about using wxAny for the series, but maybe it would be better just to be vectors. So, a PairSeries would basically be wxVector<T1,T2>. The advantage of wxAny is that I think any wxAny value can be output as a string, which obviously makes labeling easier.

Event Mechanism

Currently the library has its own sort of event mechanism. I am not yet sure exactly how this works, but there are a range of ‘FIRE’ macros and methods. I think that this could be entirely replaced using wxWidget’s normal event mechanism, with the advantage that appropriate events can be exposed and therefore custom handlers added.

This could be a major piece of work or it could be straightforward.

Both of these 2 changes are highly likely to break the library for existing applications and TBH I can’t really be bothered to write a compatibility layer.

I would welcome any thoughts on the above - and any other suggestions for that matter! Really, my time is quite limited for this, but it is a valuable learning exercise so I am happy to give it a go.

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxFreeChart - Request for Opinions

arnholm

On Wednesday, April 26, 2017 at 9:01:52 PM UTC+2, Iwbnwif Yiw wrote:
I am working on some updates to a cloned version of wxFreeChart (the original is on wxCode).

This is very good news. I have been using wxFreeChart 1.6 for quite some time, it is really an excellent library.

By 'modernising' the looks, please consider the current look as one of the options, it works well. Interactive charts are very nice, I have experimented with tooltips when hovering over data points myself, but while it works I suspect my solution isn't 100% general.  Regarding datasets & axes I contributed JulianDateAxis at some stage. It is very important for time series. Time series with hundreds of thousands of samples is a very important category for XY charts, and it needs to be supported.

It would be nice if the event mechanism was made more like the rest of wxWidgets if possible, I agree with that idea. All in all it is very good news if wxFreeChart receives some maintenance and documentation, because it is really a very useful library.

Carsten Arnholm
 

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxFreeChart - Request for Opinions

Iwbnwif Yiw

This is very good news. I have been using wxFreeChart 1.6 for quite some time, it is really an excellent library.

Yes, it is generally very well laid out and it's one of my favourites too.


By 'modernising' the looks, please consider the current look as one of the options, it works well.

Perhaps this is slightly aggrandising ;) All I have really done is change some of the default colours (white background, dark grey grid and text) and styles (solid grid lines). All of the options to customise the presentation are still there.

I am in the process of moving many of the default values to wxfreechartdefs.h, so it should be very easy to change the defaults if you don't like them.
 
Interactive charts are very nice, I have experimented with tooltips when hovering over data points myself, but while it works I suspect my solution isn't 100% general. 

I am not surprised, the fact is that it is difficult to search the current datasets because so much functionality is in the specialisations. It also intrinsically difficult to come up with a generic solution because of the differences between chart types. I want to try a 'DataPoint' base class which may use wxAny, but I am still experimenting and thinking about that idea atm.
 
Regarding datasets & axes I contributed JulianDateAxis at some stage. It is very important for time series. Time series with hundreds of thousands of samples is a very important category for XY charts, and it needs to be supported.
 
Okay, I will add a JulianDateAxis to the demos and try it with hundreds of thousands of samples. Presumably, that will be a scrolled plot?


It would be nice if the event mechanism was made more like the rest of wxWidgets if possible, I agree with that idea. 

This part has been surprisingly easy. Mouse events are propagated to the plot(s) for handling, whilst interested classes subscribe to data, axis and plot change events.

Overall it is working well, except occasionally there is an event flurry during certain actions such as chart creation and resizing. To handle this, I have introduced a throttling mechanism in the wxChartPanel class that aggregates redraw events.
 

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxFreeChart - Request for Opinions

Iwbnwif Yiw
In reply to this post by arnholm
On Tuesday, May 2, 2017 at 3:37:28 PM UTC+1, arnholm wrote:

Regarding datasets & axes I contributed JulianDateAxis at some stage. It is very important for time series. Time series with hundreds of thousands of samples is a very important category for XY charts, and it needs to be supported.

I have been looking at the JulianDateAxis and time axis in general.

Please could I clarify one thing... at the moment any series with hundreds of thousands of samples calculates and updates quite slowly in wxFreeChart. Is this something that was working and is broken in my changes or a desired improvement.

Thanks!

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Loading...