Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

flot inside a tab #835

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

Comments

Projects
None yet
2 participants
Owner

dnschnur commented Sep 28, 2012

Original author: gwp_lea...@hotmail.com (September 22, 2012 02:13:01)

First of all congrats for your work, it's great.

The problem comes when using flot inside a tab, and only for IE. More specifically, nothing is shown in IE browsers while in all other flot seems to behave ok.

I have been working with yahoo "taber" widget and flot. To be honest i'm not sure if this is just a problem of compatibility between the two or a bug in flot. I just let you know as i've been spending several hours trying to get this to work.

thank you

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

Hi i've been experiencing this problem as i'm using flot with bootstrap tabs. All the tabs but the one on the active page is having problems. The solution i came up with is that i'm waiting for the user to click the tab and then generate the graph's html. Like that there's no problem with the graph not knowing dimensions. I'll paste the code altough i'm using angular but i'm sure you guys can do this in jquery or something.:

 <div tabset>
         <div tab heading="Bar Chart">
                  <barchart ng-model='data' style="width:600px; height:300px" ></barchart>
           </div>
           <div tab heading="Line chart" ng-click="secondTab = true">
                <linechart ng-model='data' style="width:600px; height:300px" ng-if="secondTab">                  </linechart>
           </div>
 </div>

Also it could help that issue #1014. Where the legend isnot being aligned correctly when using modals or hidden code. I was experiencing the same thing on chrome and this fixed it.

Owner

dnschnur commented May 2, 2014

As described in that other issue, there is very little that we can do about this; we need to know the width of its placeholder, and it's up to users to call $.plot when that value is available.

@dnschnur dnschnur added duplicate and removed bug labels May 2, 2014

Owner

dnschnur commented May 2, 2014

Now that I look at it again, this issue is clearly a duplicate of that other one. It's older, but I'll close it as the duplicate because the other issue has a more relevant discussion.

@dnschnur dnschnur closed this May 2, 2014

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