Open GoogleCodeExporter opened 9 years ago
Original comment by dnsch...@gmail.com
on 13 Aug 2012 at 2:50
Confirmed. I see the same thing, haven't had a chance to see if I can figure
it out.
Original comment by rob...@accettura.com
on 17 Aug 2012 at 4:58
I have found the issue and will post a fix shortly.
In function setupPie() on line 187
187 function setupPie()
188 {
189 legendWidth = target.children().filter('.legend').children().width();
legendWidth is not being defined with the new jquery 1.8 library.
Original comment by andrew.theiss@gmail.com
on 17 Aug 2012 at 5:16
Its only a temporary fix but you can grab the legend width manually as the
.width() does not properly go into the object context and return the width.
legendWidth = target.children().filter('.legend').children();
legendWidth = legendWidth.context.width;
This allows for most functionality except centering inside the container
(however Im not using that so this work around is all I need)
Hope it helps for the time being even though a real solution is still needed.
Original comment by andrew.theiss@gmail.com
on 17 Aug 2012 at 6:29
[deleted comment]
jquery.flot.js line 2265: $('<div style="position:absolute;width:' +
div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' +
c + ';"> </div>').prependTo(legend).css('opacity',
options.legend.backgroundOpacity);
Should be cleaner to call .width(div.width())
Original comment by ChinagoI...@gmail.com
on 18 Aug 2012 at 3:30
Has a bug been filed against jQuery?
Original comment by rob...@accettura.com
on 20 Aug 2012 at 3:45
jquery.flot.pie.js line 189: target.children().filter('.legend') returns an
empty set on Chromium 18.
Original comment by ChinagoI...@gmail.com
on 21 Aug 2012 at 8:44
Hmm. target.children = [canvas.base, canvas.overlay].
I don't see a .legend. Looking at target itself, that returned array seems
correct. I'm guessing legend isn't being set.
Maybe a problem with flot's insertLegend vs. the flot.pie?
Original comment by rob...@accettura.com
on 21 Aug 2012 at 2:20
In jquery 1.7 the function for legendWidth returns null if no legend exists
This changed in jquery 1.8, now it returns undefined
From a theoretical standpoint, the new behaviour is more correct than the old
one.
But in calculations handling of null is different to undefinded.
PIE plugin is based on null.
Simple workaround is to add a line after line 189 like this:
if(!legendWidth) legendWidth = null;
Original comment by juergenm...@googlemail.com
on 22 Aug 2012 at 8:47
This seems reasonable. Can this be committed and made official.
(I hate to patch my code vs updating to latest).
Original comment by rob...@accettura.com
on 24 Aug 2012 at 5:39
Possibly related to:
http://bugs.jquery.com/ticket/12283
This appears to be fixed when using jQuery 1.8.1
Original comment by rob...@accettura.com
on 5 Sep 2012 at 3:49
I went crazy with this (I had jQuery 1.8.0).
I upgraded to 1.8.1 and the problem was gone! :D
Original comment by ilo...@gmail.com
on 18 Sep 2012 at 9:42
Original issue reported on code.google.com by
ChinagoI...@gmail.com
on 11 Aug 2012 at 3:07