JFreeChart 中的差距
我正在使用 JFreeChart 创建图表,并且出现以下行为。
注意粉色浅色和深色之间的间隙。
我只是随时间绘制样本数据,所以我认为它与我的数据没有任何关系。以前有人遇到过这个问题吗?我正在使用堆积 XY 面积图。
这是创建我的数据集的代码:
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++;
}
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++;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题已解决。我用它自己覆盖了绘图渲染器。
Problem fixed. I was overwriting the plot renderer with itself.