0

Is there a way to create LineChart with two Y axis? I'm aware that it would require changing internals of the LineChart. Any idea where to begin?

heky__
  • 85
  • 2
  • 6
  • The `layoutChartChildren()` method positions the axes, tick marks, and calls `layoutPlotChildren()` to layout the actual chart content, so the bulk of the work would be overriding `layoutChartChildren()`. With luck you might be able to invoke the default implementation and just do a little additional work, but you may well end up needing to reproduce a lot of the default implementation. Source code for that default implementation is [available](http://hg.openjdk.java.net/openjfx/8u60/rt/file/996511a322b7/modules/controls/src/main/java/javafx/scene/chart/XYChart.java) if you need. – James_D Jan 19 '17 at 16:46
  • You might also be interested in some other solutions http://stackoverflow.com/questions/9667405/how-to-draw-multiple-axis-on-a-chart-using-javafx-charts. (Especially once you have waded through that source code ;).) – James_D Jan 19 '17 at 16:50
  • thanks a lot, for the performance sake I'll try the first approach – heky__ Jan 19 '17 at 17:00

0 Answers0