java - JavaFX LineChart appears blank at high value -
just encountered issue javafx.scene.chart.linechart. when populating chart data double values above 5e13 or series happen disapear (see screenshot).
before
after
just in case: i'm adding data folowing code
chart.getdata().clear(); chart.getdata().add(new xychart.series<>("simulation name", sim.getdataaslist()));
it appeared upperbound property of y axis sets nan
numberaxis axis = (numberaxis) chart.getyaxis(); axis.upperboundproperty().addlistener(new changelistener<number>() { @override public void changed(observablevalue<? extends number> observable, number oldvalue, number newvalue) { if(double.isnan(newvalue.doublevalue())){ system.out.println("upperbound nan"); } } });
please, anyone!
probably best if make divisor , call axis billions or something.
otherwise set range , provide formatter.
here's snip numberaxis.java
/** use these auto ranging pick user friendly tick unit. handle tick units in range of 1e-10 1e+12 */ private static final double[] tick_unit_defaults = { 1.0e-10d, ..., 5.0e12d
Comments
Post a Comment