JavaFX LineChart Performance

前端 未结 4 2021
隐瞒了意图╮
隐瞒了意图╮ 2021-02-02 17:47

I\'ve been trying to improve the performance of LineChart in JavaFX but without great success. I also have found that this seems to be a common problem that some programmers hav

4条回答
  •  没有蜡笔的小新
    2021-02-02 18:41

    3 years later and is not a final solution as there are performance issues with big data but this help a lot (of course with this the chart will be simpler):

    CSS (you can also play with other elements in the css to speed it up, a little)

    .chart-vertical-grid-lines, .chart-horizontal-grid-lines {
        -fx-stroke: transparent;
    }
    

    Controller (this part is the one that consumes more time)

    lineChart.setCreateSymbols(false); //this part is the one that consumes more time
    lineChart.setAnimated(false);
    

    Note: this issue is the same for any chart with lots of data.

提交回复
热议问题