Menu

#55 JavaFX version of SWTChart

Next Release
open
nobody
JavaFX (1)
5
2015-01-26
2015-01-26
Bjorg
No

JavaFX offers great possibilities to design Java applications. The e(fx)clipse project of Tom Schindl has made it available for Eclipse RCP / OSGi application development. To me it seems the future of the UI technologies for Java desktop applications.
It has a nice Chart package included, but it has certain limitations: while it is good to show for example 12 month sales as bar chart and some line charts with few hundred data points, the performance is not acceptable for large time series with for example 10.000 data points. The reason seems to be the approach that data points are objects (nodes) in the scenegraph rather than rendering an image on a canvas.

I propose to port SWTChart to a JavaFX version. I spent a few hours for a proof-of-concept and the results where great so far:

  • PoC JavaFX version: <10 ms for 9000+ data points time series (~ like SWT)
  • JavaFX 8 included Chart package: 1.800 ms !!

I belive that such a JavaFX version would be of great benefit for the open source and Java / Eclipse community.

Some info on my PoC:

  • was focused on line chart, but many options worked out of the box afterwards anyways
  • removed SWT specific code, replaced by JavaFX Canvas and used corresponding methods
  • few things I removed completely as in those few hours I did not find a corresponding part in JavaFX
  • means no dependencies on org.eclipse.swt any more

Discussion

MongoDB Logo MongoDB