将滚动条添加到JFreeChart 3DBarChart [英] add scrollbar to JFreeChart 3DBarChart
问题描述
我可以在JFreeChart中添加滚动条以使我水平移动该条吗?
JFreeChart chart = ChartFactory.createBarChart3D(
title,
"X",
"Y",
dataset,
PlotOrientation.VERTICAL,
true,
false,
false
);
因为数据集可能太长,导致宽度不足以显示结果...
我可以在其上使用JSlide吗?或其他方法?
如果可以的话,请给我看一些示例代码.谢谢!
是的,如果可以访问JFreeChart演示代码,只需修改SlidingCategoryDatasetDemo2并将 createBarChart3D 替换为 createBarChart3D ,您将获得以下信息:
您将需要使用SlidingCategoryDataset.您可以在 JFreeChart
中找到源代码和演示.Can I add a scroll bar to the JFreeChart that allows me horizontally move the bar ?
JFreeChart chart = ChartFactory.createBarChart3D(
title,
"X",
"Y",
dataset,
PlotOrientation.VERTICAL,
true,
false,
false
);
Because the dataset could be very long that there's not enough width to show the result...
Can I use JSlide on it? or other methods?
If possible, please show me some sample code. Thank you!
.Yes you can, if you have access to the JFreeChart demo code just modify SlidingCategoryDatasetDemo2 and replace createBarChart3D with createBarChart3D and you will get this:
You will need to use a SlidingCategoryDataset. You can find the source code and demos here JFreeChart
这篇关于将滚动条添加到JFreeChart 3DBarChart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!