It works like a charm and no issues . but if i change from the above snippet
System.currentTimeMillis() **-** startTime to System.currentTimeMillis() **+** startTime. The x-axis dates get all messed up and chart didnt plot correctly.
In addSample method i added a sysout,
//format is HH:mm:ss
System.out.println("X is : " + format.format(System.currentTimeMillis() + startTime) + " : " + "Y is : " + valueSlider.getValue());
and the displayed value is : X is : 23:11:39 : Y is : 65.96194503171247 and so on.. The Y value is displayed properly.
I am using the example code taken from below url,
https://github.com/gillius/jfxutils/blob/master/jfxutils-examples/src/main/java/org/gillius/jfxutils/examples/Charting.java
It works like a charm and no issues . but if i change from the above snippet
System.currentTimeMillis() **-** startTime
toSystem.currentTimeMillis() **+** startTime
. The x-axis dates get all messed up and chart didnt plot correctly.In
addSample
method i added a sysout, //format is HH:mm:ssSystem.out.println("X is : " + format.format(System.currentTimeMillis() + startTime) + " : " + "Y is : " + valueSlider.getValue());
and the displayed value is :
X is : 23:11:39 : Y is : 65.96194503171247
and so on.. The Y value is displayed properly.