B4J Tutorial https://github.com/knowm/XChart

Johan Schoeman

Expert
Licensed User
Longtime User
Sleep(300) MainForm.WindowLeft = MainForm.WindowLeft - 1 MainForm.WindowLeft = MainForm.WindowLeft + 1
Walter, have you seen this hack in my code? You not having the same problem when maybe omitting these 3 lines of code?
 

walterf25

Expert
Licensed User
Longtime User
Walter, have you seen this hack in my code? You not having the same problem when maybe omitting these 3 lines of code?
I am working with a B4XPages project, so MainForm is not accessible from the B4XMainPage.
 

walterf25

Expert
Licensed User
Longtime User
This is the part that Initializes the chart on your inline java code.

Java:
  XChartPanel chartPanel;
  XYChart chart;


  public Object initRTLC(String title, String xAxisTitle, String yAxisTitle, String seriesName, double[] xdata, double[] ydata) {
 
      chart =
        QuickChart.getChart(
            title, xAxisTitle, yAxisTitle, seriesName, xdata, ydata);
            

      SwingNode swingNode = new SwingNode();   
      chartPanel = new XChartPanel(chart);
      swingNode.setContent(chartPanel);   
      Pane pane = new Pane();
      pane.getChildren().add(swingNode);
      return pane;
 
  }

Walter
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…