User Interaction?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Craig Earls

User Interaction?

Post by Craig Earls » Sat Oct 26, 2002 5:53 pm

I have purchased the documentation, but couldn't find any mention of any facilities for user interaction with the plot such as panning, and zooming. Am I missing something?

Dave Gilbert

Re: User Interaction?

Post by Dave Gilbert » Mon Oct 28, 2002 10:01 am

Hi Craig,

There are still some features to be documented, and zooming is one of them. You'll find some references in the documentation for the ChartPanel class, but it will need a complete chapter to itself. The code is also due for a review, which I will do in conjunction with the documentation.

In the meantime, feel free to ask any questions here and I'll do my best to answer them. I didn't write all the zooming code, but I am reasonably familiar with it.

Regards,

DG.

P.S. There are no options on the pop-up menu for panning yet. This needs to be added.

Craig

Re: User Interaction?

Post by Craig » Mon Oct 28, 2002 5:03 pm

Thanks, I found the references to zooming in ChartPanel. I just wanted to make sure I understood what is available before I lauch into a major effort. If I zoom in on the display there is then no way to change the location of the viewport?

Dave Gilbert

Re: User Interaction?

Post by Dave Gilbert » Mon Oct 28, 2002 7:07 pm

The ChartPanel actually zooms around the anchor point, which is updated with each click on the chart. So you have *some* control over the viewport (if I'm understanding you correctly) but there still needs to be an option for panning left/right/up/down. It needs work...

Regards,

DG.

Dave Gilbert

Re: User Interaction?

Post by Dave Gilbert » Tue Oct 29, 2002 8:41 am

I should add that panning isn't going to be difficult to add, I plan to just add some extra menu options on the pop-up menu. These will simply adjust the lower and upper bounds on the axes and redraw the chart.

Another option that might take more effort to get right is allowing the user to click and drag the chart to adjust the viewport. I think that would be nice as well...

Regards,

DG.

Locked