Gap in JFreeChart
I am creating a chart using JFreeChart, and I get the following behavior.
Notice the gap between the light and dark shades of pink.
I was just plotting sample data over time, so I don't think it has anything to do with my data. Has anyone encountered this 开发者_开发问答issue before? I am using a stacked XY area chart.
Here is the code to create my dataset:
double sample = 1.0;
TimeTableXYDataset dataset = new TimeTableXYDataset();
List<TimeSeries> timeSeriesList = timeSeriesCollection.getSeries();
for (TimeSeries t : timeSeriesList) {
for (index = 0; index < t.getItemCount(); index++) {
dataset.add(t.getTimePeriod(index), sample, t.getDescription());
}
sample++;
}
Problem fixed. I was overwriting the plot renderer with itself.
精彩评论