B4J Tutorial Using JavaObject and JavaFx - LineChart

To help with my own learning I have played with JavaObject and JavaFX to create linecharts.

Here are the 3 examples I have made I have ported the code directly from the Oracle documentation.

The examples are fully documented and require the JavaObject Library.

The Oracle documentaton for LineChart is here.

I hope you find it useful.
 

Attachments

Last edited:
Sorry,stevel05,
I had copied the wrong line. It reads
Code: Copy
miyaxis1.RunMethod("setAutoRanging",Array As Object(False))
In the designer, the axis got the ID miyaxis and was set to autorange also there.

I think it's quite clear that the zero line will be included in the chart, despite autorange setting (at least when having all negative data, not having tried the other direction).
The program won't run if it is not receiving data from a µC, so posting won't be very useful. For ultimate testing a simple program would be better suited, maybe I will try.
 
To help with my own learning I have played with JavaObject and JavaFX to create linecharts.

Here are the 3 examples I have made I have ported the code directly from the Oracle documentation.

The examples are fully documented and require the JavaObject Library.

The Oracle documentaton for LineChart is here.

I hope you find it useful.

I can not find how to remove the point 0 when the values exceed 10 points... how can I create effect oscilloscope with your code!!

Thank 1000
 
I haven't tried it, but the charts are probably not designed to produce animations. Having said that, you could try rebuilding the data set and redraw the whole thing if it's fast enough.
 
Hello guys,
I am new here. I would have a question : Could it be possible to make the charts active, like to be able to change the values while you are seeing the graph ?

Thank you.
 
Hi Sergiu, same answer as post #23, try rebuilding the data set and redraw the graph.
 
Back
Top