gmmoraesbr / flot

Automatically exported from code.google.com/p/flot
0 stars 0 forks source link

Keep the zoom after a postback. #335

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm using flot in a project, but I'm facing an issue.

When I zoom on a part of my graph and then refresh the page, is it 
possible to prevent my ranges.xaxis.from & ranges.xaxis.to from reseting?

Original issue reported on code.google.com by QBerth...@gmail.com on 20 Apr 2010 at 2:36

GoogleCodeExporter commented 8 years ago
You need to code around this - I can't do anything about it in Flot because the 
whole Flot state is wiped out by the refresh; not without recoding Flot as a 
state-saving ASP component which I happen to think is a giant horrible hack to 
begin with. :)

You can save/extract the zoom values and save them somewhere so you can get 
them the across the postback. Or instead of using the postback mechanism you 
could do an Ajax (so the page is not refreshed).

Sorry for the sluggish reply, thought I would answer this anyway in case anyone 
bumps into it. Generally, it's better to ask on the forum/mailing list because 
the response rate there is faster.

Original comment by olau%iol...@gtempaccount.com on 13 Dec 2010 at 3:37

GoogleCodeExporter commented 8 years ago

Original comment by dnsch...@gmail.com on 4 Jun 2012 at 2:41