JavaFx LineChart interrupt serie

2019-06-10 05:59发布

问题:

My software log some devices parameters and if the device is turned off i want to "interrupt" the series (i think i'll add a special value on the data to highlight a device off) and draw new points only when the device is turned on.

I'm using JavaFx LineChart (i don't want to change library)

Sorry for my very no talent using paint!

回答1:

You should treat each line before and after the break as a new series in the chart. You can keep the colors the same by assigning them to a custom css style class, and defining the class in your application's css file.



标签: javafx charts