Vsrusis / flot

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

Graph labels and bootstrap #635

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Thanks for making this brilliant jQuery plugin. 

Been experimenting with flot on a site I'm making using Twitter Bootrstap CSS 
framework. It works fine except for the graph labels (table).

Found a workaround; replace line 2223 with this:
var legend = $('<div class="legend">' + table.replace('style="', 
'style="position:absolute;' + pos +'width:auto;') + 
'</div>').appendTo(placeholder);

Cheers! 

Original issue reported on code.google.com by starefos...@gmail.com on 21 Nov 2011 at 3:33

GoogleCodeExporter commented 8 years ago
I ran into the same issue using flot with Bootstrap.

Alternatively, you could add to your CSS, overriding tables for your flot 
element, ex:

#placeholder table {
    width: auto;
}

Original comment by khang.hu...@gmail.com on 24 Nov 2011 at 4:29

GoogleCodeExporter commented 8 years ago
It sounds like we need to examine the default CSS used by the legend table, to 
avoid it getting overridden unless that's explicitly desired.

Original comment by dnsch...@gmail.com on 5 Jun 2012 at 3:35