I would like a scroll bar to appear besides the vertical bar plot,
since I have too many bars on my plot (so that the bars will have an uniform size). Is this possible?
thanks
Sudha
How to add scroll bar?
RE: How to add scroll bar?
Hi Sudha,
I haven't tried this, but you should be able to embed a JFreeChartPanel within a JScrollPane to get scroll bars for the chart as a whole - this would solve your problem of too many bars for the available space, but I guess the chart titles etc might scroll away also!
Setting scrollbars for just the plot area is more of a problem, since JFreeChart draws to a Graphics2D object - that might represent the printer, the screen, or an image in memory. So for this general case, adding scrollbars is a problem.
I'm open to ideas for workarounds...
Regards,
DG.
I haven't tried this, but you should be able to embed a JFreeChartPanel within a JScrollPane to get scroll bars for the chart as a whole - this would solve your problem of too many bars for the available space, but I guess the chart titles etc might scroll away also!
Setting scrollbars for just the plot area is more of a problem, since JFreeChart draws to a Graphics2D object - that might represent the printer, the screen, or an image in memory. So for this general case, adding scrollbars is a problem.
I'm open to ideas for workarounds...
Regards,
DG.