JavaFx LineChart中断系列 [英] JavaFx LineChart interrupt serie
问题描述
我的软件记录了一些设备参数,如果设备关闭,我想中断系列(我想我会在数据上添加一个特殊值以突出显示设备)并仅在设备已开启。
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.
我正在使用JavaFx LineChart(我不想更改库)
I'm using JavaFx LineChart (i don't want to change library)
抱歉,我没有使用油漆的天赋!
Sorry for my very no talent using paint!
推荐答案
您应该将休息前后的每一行视为图表中的新系列。您可以通过将颜色分配给自定义css样式类并在应用程序的css文件中定义类来保持颜色相同。
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 LineChart中断系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!