Howto set default dateWindow for double click zoom reset?

344 views
Skip to first unread message

Cameron Blackwood

unread,
Mar 27, 2014, 7:55:19 AM3/27/14
to dygraph...@googlegroups.com

Hi there

Im a crufty old sysadmin who has caved to the need to learn javascript ;-) so im doing some plotting stuff to get myself into the groove.

First of all, Im loving dygraph. It seems to have all the bells and whistles that i could think of needing.

So I have collected a whole set of 'player counts' from my gaming clan's servers and im trying to display it in a nice way. There is a public 'recent usage' page and a more private 'historical usage' page (which is less commonly used, but goes back further). I load in the whole data set in each page, but use 'dateWindow' to display only the first day of data on the recent usage page.

I have buttons for some default zoom levels (day, 3 days, week, 2 weeks, month) but the data actually goes back further than that (for the 'historical page').

Id like to limit how far the double-click-zoom-reset jumps back to. Any suggestions on how to do that?

I see there is a way to do it with zoomCallback and cap/rewrite the numbers before calling showXDimensions, but I wondered if I am missing some obvious other solution.

cheers,
cam

Dan Vanderkam

unread,
Mar 29, 2014, 1:30:02 PM3/29/14
to dygraph...@googlegroups.com
No, there's no obvious way. You're not missing anything. The approach you described (catching zoomCallback) is probably the best way to do this.


--
You received this message because you are subscribed to the Google Groups "dygraphs-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages