Closed GoogleCodeExporter closed 9 years ago
function call
-------------------------------------------------------------
var percentCmpVal = $("#percentReduction").text();
$("#barCurrentsession").drawPercentBar(percentCmpVal );
---------------------------------------------------------------
actual function
----------------------------------------------------------------
(function($) {
$.fn.drawPercentBar = function(pct, options) {
var settings = $.extend({
refColor: '#1589FF',
dataColor: '#1569C7'
}, options || {});
var refBar = [[0, 0], [100, 1]];
var dataBar = [[0, 0], [pct, 1]];
$.plot($(this),
[{ data: refBar, color: settings.refColor },
{ data: dataBar, color: settings.dataColor}],
{
bars: { horizontal: true, align: "center", show: true },
lines: { show: false },
points: { show: false },
yaxis: { ticks: 0 },
grid: { clickable: true, hoverable: true },
xaxis: {
tickFormatter: function formatter(val, axis) {
return (val + "%");
}
}
}
);
};
})(jQuery);
Original comment by nikhilsh...@gmail.com
on 4 Jun 2009 at 7:39
Hm, maybe something is sticking out. IE sometimes treats heights as minimum
heights
and simply expands the box.
I don't have time to do a lot of debugging right now, but have you tried
removing the
placeholder from the DOM and inserting it again? If you put it inside a
container,
then something like this
$("#placeholder").remove();
$("#somecontainer").append('<div id="placeholder"
style="width:600px;height:300px"></div>')
// now do the plot
$.plot($("#placeholder"), ...)
Or you could simple empty it and reset the dimensions
$("#placeholder").html().width(600).height(300)
Original comment by olau%iol...@gtempaccount.com
on 5 Jun 2009 at 5:25
Wow.. tht was impressive.. it fixed that issue..!
awesome..!
thxs. :-)
Original comment by nikhilsh...@gmail.com
on 5 Jun 2009 at 7:23
OK, I'll close the bug then.
Original comment by olau%iol...@gtempaccount.com
on 19 Jun 2009 at 10:03
Issue 170 has been merged into this issue.
Original comment by olau%iol...@gtempaccount.com
on 19 Jun 2009 at 10:06
Original comment by dnsch...@gmail.com
on 4 Jun 2012 at 2:52
Original issue reported on code.google.com by
nikhilsh...@gmail.com
on 4 Jun 2009 at 7:35Attachments: