JavaFX Overlay

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Post Reply
rsalter
Posts: 1
Joined: Sat Nov 04, 2017 4:57 pm
antibot: No, of course not.

JavaFX Overlay

Post by rsalter » Sat Nov 04, 2017 5:03 pm

Is it possible to add a crosshair overlay to a chart displayed using the JavaFX ChartViewer component?
If not, is it anticipated?

John Matthews
Posts: 427
Joined: Wed Sep 12, 2007 3:18 pm

Re: JavaFX Overlay

Post by John Matthews » Sat Nov 04, 2017 6:47 pm

What happens if you add a ChartPanel with overlay, for example, to a JFXPanel?

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

Re: JavaFX Overlay

Post by david.gilbert » Sun Nov 05, 2017 11:38 am

rsalter wrote:Is it possible to add a crosshair overlay to a chart displayed using the JavaFX ChartViewer component?
If not, is it anticipated?
Yes it is possible, but with the so-far-unreleased code at GitHub. I am creating a new release of JFreeChart that has the JavaFX code stripped out (no JavaFX means that the code will compile with JDK1.6), then created a separate project that contains the JavaFX extensions:

https://github.com/jfree/jfreechart-fx

All publicly available demo programs have been moved to another project:

https://github.com/jfree/jfree-fxdemos

If you look in there, you'll see a demo CrosshairOverlayFXDemo1.java that demonstrates the feature you are looking for. The only complication for now is that you'll have to check out several projects from GitHub and build them yourself in order to get this working. Today is a rainy day, so maybe I'll get some releases out the door.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited

Post Reply