SPIKE: how to zoom the heatmap
Reported by Jonathan Lister | September 28th, 2010 @ 07:41 AM | in 0.8
NOW must not move off the right-hand side.
Comments and changes to this ticket
-

Jonathan Lister September 29th, 2010 @ 12:58 AM
- State changed from new to open
- Milestone order changed from 4 to 0
Let's start with expanding or contracting by a factor of 2. Adding buttons to try.
-

Jonathan Lister September 29th, 2010 @ 01:36 AM
Three ways of doing this:
- zoom all the elements (as this Raphael plugin does: http://github.com/wout/raphael-zoom)
- use the viewBox attr of the main SVG element - this does not
work in IE (VML has no viewBox attr?)
- for IE, use the zoom attribute, see this thread: http://groups.google.com/group/raphaeljs/browse_thread/thread/811b0...
Going to try out 3.
- zoom all the elements (as this Raphael plugin does: http://github.com/wout/raphael-zoom)
-

Jonathan Lister September 29th, 2010 @ 01:44 AM
3 is cool, but it is zooming the labels as well as the x-axis. Didn't think about that... so I need to be more specific about what I want from zooming:
- x-axis timescale zooms, altering the labels on the x-axis
- blobs are recalculated based on the different window of time represented by one increment on the x-axis
-

Jonathan Lister September 29th, 2010 @ 02:29 AM
- State changed from open to resolved
I've done a two-level zoom, which you switch between with zoom buttons:
http://img.skitch.com/20100929-bqsu64h9383dtiwb7yhtr16hna.jpgThings to watch out for:
- when removing old elements, remove their events handlers first to make sure memory leaks don't pop up
- need to add the last data point in at the end if there are an odd number of data points (as we're merging each pair together and the presence of "NOW" means there's always an odd number of x-axis increments) - you can see on the screenshot above how the last data point is missing
- supporting more than two zoom levels would require calculating the new data points and x-axis points given a value for the zoom level
- you couldn't zoom out beyond the default zoom level at this point -- if you wanted to do that using this same technique (say you had a load of points off screen) you would want to treat the default zoom as an intermediary zoom level
-

Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A Real Time Differencing Tool.
People watching this ticket
- Nobody is watching this ticket.