Jfreechart - Refresh a chart according to changing data

后端 未结 6 1622
旧时难觅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 18:59

    What worked with me was the following:

    //reset with new dataset
    chart().setDataset(dataset);
    repaint the ChartPanel that contains the JFreeChart
    chartPanel.repaint();
    

提交回复
热议问题