I am using JFreeChart library to plot something in an Eclipse view and currently my code for view initialization looks as follows:
@Override
public void createPartControl(Composite parent)
{
JFreeChart chart = null;
// Created via different object
chart = graph.createLineChart("Test Graph", "x", "y");
ChartComposite frame = new ChartComposite(parent, SWT.NONE, chart, true);
frame.setRangeZoomable(false);
parent.layout(true);
}
I wanted to add scrolling to my graph when the user zooms in, but so far all the examples that I found (in the demo package, here, and other sources) are based on Swing dealing with JPanes and ChartPanels.
How can I achieve the same in the createPartControl() function of my view where I have only a Composite. Is it possible to do it in SWT only or should I mix (need to figure out how) SWT with SWING or AWT?
Thank you
You might look at
SlidingXYDataset, mentioned here, or the paging approach shown here.