1 Reply Latest reply on Apr 5, 2013 12:31 PM by 1001246

    Displaying 3 LineCharts in a single window

      Hi everyone,

      je développe un logiciel qui doit m'afficher trois LineCharts les uns au dessus des autres.
      I'm currently working on a program that is supposed to display 3 different LineCharts.

      Until now, my main window is made of an AnchorPane which allows me to place 3 blocs of info and tools on the right side of if (just like Adobe's programs) and when i'm resizing the window, they stick to the border.


      On the left side, i'm trying to display my charts.

      One chart is (quite) OK:


      But if I try to display 3 of them by specifying the setTopAnchor and setBottomAnchor properties of each of them, it gets messy:


      Here's a piece of code:
      AnchorPane.setLeftAnchor(lineChart, 1.0);
                  AnchorPane.setRightAnchor(lineChart, 151.0);
                  AnchorPane.setTopAnchor(lineChart, 1.0);
                  AnchorPane.setBottomAnchor(lineChart, 200.0);
                  AnchorPane.setLeftAnchor(lineChart2, 1.0);
                  AnchorPane.setRightAnchor(lineChart2, 151.0);
                  AnchorPane.setTopAnchor(lineChart2, 201.0);
                  AnchorPane.setBottomAnchor(lineChart2, 400.0);
                  AnchorPane.setLeftAnchor(lineChart3, 1.0);
                  AnchorPane.setRightAnchor(lineChart3, 151.0);
                  AnchorPane.setTopAnchor(lineChart3, 401.0);
                  AnchorPane.setBottomAnchor(lineChart3, 600.0);
      How do I display 3 different LineCharts in the same window, with different data series?

      Any help is welcome :)

      Thanks in advance.