chart-fx icon indicating copy to clipboard operation
chart-fx copied to clipboard

Fix usage of `renderer.getAxes` in `DataPointToolTip` and other plugins

Open wirew0rm opened this issue 2 years ago • 1 comments

Discussed in https://github.com/fair-acc/chart-fx/discussions/638

Originally posted by sergiofdezperea November 13, 2023 Hello,

I'm trying to migrate an application from java swing to javafx. This library looks perfect to replace jfreechart.

I was playing with the plugins and i can't make work DataPointTooltip using SimpleChartSample, when i check the render getAxes it returns an empty array.

In FXSampler it doesn’t work either for me.

Recording 2023-11-13 at 08 55 32

Intitial Investigation: Seems to have been broken on the 11.3 major release, where the semantic on the renderer.getAxes() list changed slightly from always returning the used axes to only holding the axes explicitly set by the user.

Workaround:

renderer.getAxes().addAll(chart.getAxes()); // explicitly set renderer axes until Tooltip Plugin is fixed

wirew0rm avatar Nov 13 '23 12:11 wirew0rm

I think #677 is a duplicate of this issue and resolved, it might be fixed in main.

dedeibel avatar Dec 12 '24 10:12 dedeibel