JavaFX 2.0

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
dsambhar
Posts: 4
Joined: Mon Oct 31, 2011 11:02 am
antibot: No, of course not.

JavaFX 2.0

Post by dsambhar » Mon Oct 31, 2011 11:03 am

Do we have any sample available to use JFreeChart with JavaFX 2.0?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: JavaFX 2.0

Post by david.gilbert » Wed Nov 02, 2011 6:27 am

I've not had a chance to try out JavaFX 2.0 yet (and maybe never will), so I don't know what is possible. From my reading, I understand that it is possible to embed JavaFX into Swing UIs, but not the reverse (so the approach of embedding a ChartPanel into a JavaFX scene is not going to work - it was available in JavaFX 1.0 I remember, but Sun did state that it wasn't going to be supported long-term). A couple of friends of mine are working on a general solution to that which you can read about here:

http://www.jroller.com/neugens/entry/em ... _javafx_21

I don't know if there is another approach, but it would be interesting to see:
  • if JavaFX has any support for rendering via the "old-fashioned" Graphics2D API (which is the "target" for all JFreeChart rendering); or
  • how difficult it would be to create an exporter for JFreeChart that creates a scene graph for the chart content.
There is a chart library built-in with JavaFX, so that might be another option for you.

The biggest challenge facing JavaFX (my opinion) is getting it onto mobile devices and my prediction is that Oracle and the JavaFX team won't solve that issue quickly enough for JavaFX to gain real traction before something else takes over the space (Google's Dart springs to mind).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

dsambhar
Posts: 4
Joined: Mon Oct 31, 2011 11:02 am
antibot: No, of course not.

Re: JavaFX 2.0

Post by dsambhar » Wed Nov 02, 2011 8:26 am

Thanks David for your reponse and pointing me towards the Jroller article.

Yes, I did look at JavaFX chart library but the features needed for Stock market charts(say Price Volume chart or Combined domain chart) are not available out of the box. I was looking at using the JFree API and embed it in JavaFX.

Thanks once again.

Dheeraj

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: JavaFX 2.0

Post by david.gilbert » Mon May 19, 2014 12:43 pm

I finally had a chance to look at JavaFX more closely, last week, and I will add JavaFX support to JFreeChart by using a custom Graphics2D implementation that maps directly to the JavaFX Canvas. The initial code for this is available on GitHub:

https://github.com/jfree/fxgraphics2d
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked