add scrollbar to JFreeChart 3DBarChart
Asked Answered
C

1

0

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!

Conney answered 25/5, 2012 at 12:49 Comment(0)
A
1

.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:

3d Scrolling Chart

You will need to use a SlidingCategoryDataset. You can find the source code and demos here JFreeChart

Analemma answered 25/5, 2012 at 14:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.