JfreeChart: Scroll XYBarChart Horizontally - (chart translation and navigation)

后端 未结 3 1362
南方客
南方客 2021-01-06 14:22

I am trying to scroll my XYBarChart horizontally, I am following one of the JfreeChart\'s Demo \"TranslateDemo1.java\" in which the source code you can find here:

h

3条回答
  •  被撕碎了的回忆
    2021-01-06 14:44

    Thanks trashgod :D But I gave up on this approach. I need to get some work done over here ;) So in order to navigate on the graph I used a different dataset org.jfree.data.time.DynamicTimeSeriesCollection.

    This class is aimed for real-time applications in which we have the ability to append new data and discard the oldest in a pretty fast way (depend on your input data). In summary, every time that someone scroll the bar I just need to change my underlying dataset, and that will fire a PlotChangeEvent which, in turn, gets passed on to the chart and results in a ChartChangeEvent being fired.

    This chain of events is used to ensure that charts are automatically updated whenever a change is made to any component of the chart.

    Once again, thank you very much

提交回复
热议问题