Hallo !
If I put a JFreeChartPanel in a JSrollPane it works not correct. The bars are drawn outside of the border of the JFreeChartPanel. This happens only if the scroll bars appears and if the scroll bars are moved.
Is there any solution or suggestion to make a bar chart scrollable ?
Problem with scrolling bar charts
RE: Problem with scrolling bar charts
Hi Horst,
It's very likely a problem with the JFreeChartPanel class. I'll try out the scroll pane tomorrow and see if I can figure it out.
DG.
It's very likely a problem with the JFreeChartPanel class. I'll try out the scroll pane tomorrow and see if I can figure it out.
DG.
RE: Problem with scrolling bar charts
Actually, it's not a problem with JFreeChartPanel. It's a bug in the HorizontalBarPlot and VerticalBarPlot classes, which I managed to replicate and fix just now. If you find the line:
g2.setClip(plotArea)
in the draw(...) method just before the bars are plotted, and change it to:
g2.clip(plotArea);
then the plot should work inside a JScrollPane (it does for me!).
Thanks for reporting the bug...
Regards,
DG.
g2.setClip(plotArea)
in the draw(...) method just before the bars are plotted, and change it to:
g2.clip(plotArea);
then the plot should work inside a JScrollPane (it does for me!).
Thanks for reporting the bug...
Regards,
DG.