Using ChartViewer in FXML

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
plusik
Posts: 28
Joined: Tue May 16, 2006 3:36 am
Location: Boston, MA, USA

Using ChartViewer in FXML

Post by plusik » Tue Jan 19, 2016 4:01 pm

Hi,

Currently the ChartViewer node cannot be used in FXML. I think the only reason is because it does not have a constructor without arguments (when I extended the ChartViewer class and added a simple constructor without arguments, I could add my wrapper class into FXML and it works).

By the way, the contextMenuEnabled parameter in the ChartViewer constructor seems to be completely ignored.

Another strange thing is that ChartViewer defines a private contextMenu field. Since ChartViewer extends Control, Control already has a contextMenu property, so I think there is no need to add a new one.

Tomas

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

Re: Using ChartViewer in FXML

Post by david.gilbert » Tue Jan 19, 2016 5:58 pm

Thanks Tomas, good feedback. I will make those improvements to the ChartViewer class for the 1.0.20 release. I'm currently working on getting FXGraphics2D released, and once that is done I will do new releases of JFreeChart and Orson Charts.
David Gilbert
JFreeChart Project Leader

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

Locked