Flot + thickbox 3 iframe #94

Closed
dnschnur opened this Issue Sep 28, 2012 · 6 comments

Comments

Projects
None yet
1 participant
Owner

dnschnur commented Sep 28, 2012

Original author: marcis.p...@gmail.com (December 13, 2007 17:15:52)

What steps will reproduce the problem?

  1. make link <a
    href="?blah=123&KeepThis=true&TB_iframe=true&height=400&width=600"
    class="thickbox">test</a>
  2. click on the link
  3. couse javascript error

Original issue: http://code.google.com/p/flot/issues/detail?id=15

Owner

dnschnur commented Sep 28, 2012

From olau%iol...@gtempaccount.com on December 13, 2007 18:50:10
Would you please try debugging it?

Otherwise please provide a test page to allow someone else to try.

Owner

dnschnur commented Sep 28, 2012

From marcis.p...@gmail.com on February 18, 2008 14:35:03
Here some example:

http://marcis.info/temp/flot/

Owner

dnschnur commented Sep 28, 2012

From marcis.p...@gmail.com on March 13, 2008 14:29:02
tried the same example with flot 0.4. the same error ;/

Owner

dnschnur commented Sep 28, 2012

From olau%iol...@gtempaccount.com on March 13, 2008 16:43:46
I went to that page and it casts an exception: "Invalid dimensions for plot, width =
0, height = 0". This means that the placeholder object hasn't got the dimensions set
at the time where you try to do the plot.

In your case this is probably because the placeholder is hidden (display:none) at the
moment you call $.plot. You need to refactor your code to prevent this. I don't know
what thickbox is doing so I can't tell what would work best, but a quick fix would
perhaps be to just wait a short moment with setTimer().

In short: this is not a Flot bug as the canvas must have its dimensions set before
Flot can do anything.

My apologies for it taking so long. I can recommend using the mailing list in the
future - in fact there was a discussion today about the same kind of problem. It's
available like a web forum with the Google Groups web interface.

Owner

dnschnur commented Sep 28, 2012

From olau%iol...@gtempaccount.com on March 14, 2008 10:40:35
I did a couple of tests, and I'm beginning to think that the problem isn't that the
placeholder is hidden at the moment you call $.plot but rather that the DOM isn't
ready yet. It's just a theory, but it might be related to the fact that you doing the
plot inside an iframe.

I found this link which might help:

http://ideamill.synaptrixgroup.com/?p=6

Owner

dnschnur commented Sep 28, 2012

From olau%iol...@gtempaccount.com on March 14, 2008 12:52:37
Hm, did some more testing. The results seem to contradict what I just said.

@dnschnur dnschnur closed this Sep 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment