I am using JFreeChart in my java application.
Problem
I want to plot a XYAreaChart whose domain axis (x-axis) should scroll horizontally automatically when we start plotting the data.
I saw the same thing in TimeSeriesCharts but I don't want any timeSeriesChart. I just want the scrolling x-axis.
trashgod
You'll need to create your own SlidingXYDataset
that implements XYDataset in a manner similar to how SlidingCategoryDataset
implements CategoryDataset
.
Addendum: As noted in a comment, a typical implementation can be found here.
来源:https://stackoverflow.com/questions/5367222/jfreechart-problem-in-creating-moving-chart