`final Node chartBackground = chart.lookup(".chart-plot-background"); for what?
lhuangjs opened this issue · comments
Jia Huang commented
Hi, I need the zoom function so I added your ZoomManager
class in my application. And I made some changes to it. But when I added my chart in my pane (chart in StackPane in VBox in GridPane in Scene) and zoom, the chart disappeared. So I want to kown your code how to work. However I have a question that I can not understand.
- In line 233
final Node chartBackground = chart.lookup(".chart-plot-background");
Do this for what?
Kerner commented
Hi,
please see the Examples.
// DO NOT ADD DATA TO CHART
// bc.getData().addAll(series1, series2, series3);
final StackPane pane = new StackPane();
pane.getChildren().add(bc);
final Scene scene = new Scene(pane, 500, 400);
new ZoomManager(pane, bc, series1, series2, series3);
Do not add the chart data to the chart, but to the zoom manager.