Line vis (NOT Time Line) with pan and zoom?

39 views
Skip to first unread message

Clive Galway

unread,
Jul 26, 2013, 7:45:47 AM7/26/13
to google-visua...@googlegroups.com
Hi all,
Was wondering if it is possible to create a line chart that features google-maps-like pan and zoom (ideally mouse wheel zoom not drag select).
Zooming on both axes would be preferable.

The chart we want to display is this one:

Any suggestions welcomed, Google API or not.

Or do people think we could maybe shoehorn this data into a timeline and have it make sense? Anything considered!

TIA

asgallant

unread,
Jul 26, 2013, 4:19:45 PM7/26/13
to google-visua...@googlegroups.com
You should be able to implement something of this nature.  Bind a mousewheel event to the chart div (or probably better, the chartArea inside the chart), and use the direction and distance travelled by the mousewheel to change the chart's hAxis and vAxis viewWindow.min/max values and redraw the chart.  You can use mouse position in the chart to give you an idea of where to center your zoom.  Panning might be implemented similarly, by handling mouse down, mouse move, and mouse up events in the chart area, redrawing the chart with new viewWindow values.
Reply all
Reply to author
Forward
0 new messages