JavaFX support
JavaFX support
Hi,
There has been no new release of JFreeChart since July 2014. Would it be possible to release an updated version including the JavaFX support classes, and deploy it in Maven Central? I think more and more people are working in JavaFX now, so it would be helpful.
Happy New Year!
Tomas
There has been no new release of JFreeChart since July 2014. Would it be possible to release an updated version including the JavaFX support classes, and deploy it in Maven Central? I think more and more people are working in JavaFX now, so it would be helpful.
Happy New Year!
Tomas
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
Re: JavaFX support
Would this imply the need for a separate Maven artifact For JavaFX?
For reference, I used Java 1.8.0_66 and ant 1.9.2 on Mac OS X 10.11 to build jfreechart-1.0.19-fx.jar:
The following error appears to be due to a change in the API between JavaFX 2.2: javafx.scene.control.Control and JavaFX 8: javafx.scene.control.Control.
Changing the signature to public seemed to produce a working JAR, for example:
Profiling with jvisualvm produced none of the CPU and memory problems mentioned in these related threads.
For reference, I used Java 1.8.0_66 and ant 1.9.2 on Mac OS X 10.11 to build jfreechart-1.0.19-fx.jar:
Code: Select all
cd ant ; ant -f build-fx.xml all
Code: Select all
compile:
...
[javac] source/org/jfree/chart/fx/ChartViewer.java:122: error: getUserAgentStylesheet() in ChartViewer cannot override getUserAgentStylesheet() in Region
[javac] protected String getUserAgentStylesheet() {
[javac] ^
[javac] attempting to assign weaker access privileges; was public
...
[javac] 1 error
Code: Select all
java -cp .:lib/* org.jfree.chart.fx.demo.BarChartFXDemo1
java -cp .:lib/* org.jfree.chart.fx.demo.PieChartFXDemo1
java -cp .:lib/* org.jfree.chart.fx.demo.TimeSeriesChartFXDemo1
Re: JavaFX support
Yes, we can compile the javafx-enabled jar using ant, but it would be nice to have it in Maven Central so mavenized projects can directly add it as a dependency.
David, *please*.
David, *please*.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: JavaFX support
It's noted. I'm working on doing new releases of FXGraphics2D, Orson Charts and JFreeChart. It's slow because I don't have much spare time but I will create the Maven artefact for a JavaFX enabled version of JFreeChart when the release (1.0.20) is done.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: JavaFX support
What is the status of version 1.0.20 with a JavaFX module?
We would like to start using JFreeChart with JavaFX as we are moving away from Swing.
In the meantime. How can I start using JFreeChart with JavaFX until 1.0.20 is ready?
I have been trying to compile a package myself from the source, but that didn't go so well.
Tried first to run maven build, that did not work.
Tried to execute the ant builds. I was able to build the standard build.xml, but build-fx.xml failed with same error as John Matthews got.
Edit: I got the source from GitHub and was able to build with maven using maven/pom-javafx.xml
Edit: Seems like JFreeChart and PolarPlot still uses some Swing/AWT code. Are there any plans for full JavaFX support on those?
We would like to start using JFreeChart with JavaFX as we are moving away from Swing.
In the meantime. How can I start using JFreeChart with JavaFX until 1.0.20 is ready?
I have been trying to compile a package myself from the source, but that didn't go so well.
Tried first to run maven build, that did not work.
Tried to execute the ant builds. I was able to build the standard build.xml, but build-fx.xml failed with same error as John Matthews got.
Edit: I got the source from GitHub and was able to build with maven using maven/pom-javafx.xml
Edit: Seems like JFreeChart and PolarPlot still uses some Swing/AWT code. Are there any plans for full JavaFX support on those?
Re: JavaFX support
Is it possible to style the JFreeChart with CSS? I have a PolarPlot which I style programaticaly and would like to use CSS to get a consistent look.
PolarPlot .setAngleGridlinePaint()
PolarPlot .setRadiusGridlinePaint()
JFreeChart .setBackgroundPaint()
PolarPlot .setBackgroundPaint()
PolarPlot .setBackgroundImage()
PolarItemRenderer .setSeriesPaint()
Since both JFreeChart and PolarPlot are using AWT I think perhaps it is not possible to style with CSS. Or is it?
Edit: The ChartViewer does seem to support CSS, according to its Javadoc, but what are the style properties available for it?
Would be great if JFreeChart with ChartViewer and ChartCanvas could support the CSS style properties defined in JavaFX Charts
https://docs.oracle.com/javase/8/javafx ... tml#charts
Isn't support for CSS easy to implement in ChartViewer and ChartCanvas? Just add style classes for plots like PolarPlot.
PolarPlot .setAngleGridlinePaint()
PolarPlot .setRadiusGridlinePaint()
JFreeChart .setBackgroundPaint()
PolarPlot .setBackgroundPaint()
PolarPlot .setBackgroundImage()
PolarItemRenderer .setSeriesPaint()
Since both JFreeChart and PolarPlot are using AWT I think perhaps it is not possible to style with CSS. Or is it?
Edit: The ChartViewer does seem to support CSS, according to its Javadoc, but what are the style properties available for it?
Would be great if JFreeChart with ChartViewer and ChartCanvas could support the CSS style properties defined in JavaFX Charts
https://docs.oracle.com/javase/8/javafx ... tml#charts
Isn't support for CSS easy to implement in ChartViewer and ChartCanvas? Just add style classes for plots like PolarPlot.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: JavaFX support
The JavaFX support will remain as implemented already, via the bridge class FXGraphics2D...which means that the rendering will be to a JavaFX Canvas node. The next release will just fix some issues and include the JavaFX support out-of-the-box without requiring the library to be built from the sources.
There isn't any CSS support yet. I will spend some time looking at StylableProperties to provide some CSS styling capability....this was suggested to me by Gerrit Grunwald at a JavaFX meeting in Zurich in December, but I haven't had a chance to try it yet.
There isn't any CSS support yet. I will spend some time looking at StylableProperties to provide some CSS styling capability....this was suggested to me by Gerrit Grunwald at a JavaFX meeting in Zurich in December, but I haven't had a chance to try it yet.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: JavaFX support
Great. It would help us a lot with CSS support. Specially now that we are moving away from Swing.david.gilbert wrote:There isn't any CSS support yet. I will spend some time looking at StylableProperties to provide some CSS styling capability....this was suggested to me by Gerrit Grunwald at a JavaFX meeting in Zurich in December, but I haven't had a chance to try it yet.