JFreeChart in scrollpane

I have a big chart created using jfreechart. This chart is too large for the screen, so I would like to put it in a scrollpane. However, when using the scrollbar, the full graph is redrawn every time, which makes it extremely slow. Is there a solution for this?

thanks,

Bart

+3
source share
4 answers

Buffer it yourself. Display JFreeChart in a panel that is not in the visible panel, and use it as your buffer for the panel located in scrollpane. Then you can manage the redraw events and how often you synchronize the two panels.

+1
source

, ChartPanel , . , .

public ChartPanel(JFreeChart chart, boolean useBuffer);
0

JFreeChart , , , JScrollPane .

, datapoints . "kludges", ; .

  • (, SeriesDataset), SeriesChangeEvent, .
  • , SeriesChangeEvent N , , , " ".
0

, , , , - . ChartPanel jscrollpanes . .

, - , .

0

Source: https://habr.com/ru/post/1722788/


All Articles