Jfreechart - Refresh a chart according to changing data

后端 未结 6 1621
旧时难觅i
旧时难觅i 2020-12-16 18:23

I would like to know how to refresh a chart if we want to change \"in live\" some piece of data. I mean for instance, I have a chart with a TaskSeries which appears on 3 yea

6条回答
  •  借酒劲吻你
    2020-12-16 19:24

    I had this issue too with an XYPlot. I found a workaround by resetting the dataset:

    chart.getXYPlot().setDataset(chart.getXYPlot().getDataset());
    

    that's crazy but it works...

    Note: chart.setNotify(true) seems to do nothing.

提交回复
热议问题