Reputation: 8578
I have a very simple chart, no interesting code behind the scenes, but every time, the chart is loaded differently, alternating between two ways of placing the labels like this:
All the labels seem to be pushed up into different locations. I am using:
and the code behind this is:
var options =
{
series: {
pie: {
show: true,
label: {
show: true,
formatter: function (label, series)
{
return '<div style="font-size:8pt;text-align:center;padding:2px;color:white;background-color:#000">' + label + '<br/>' + Math.round(series.data[0][1]) + '%</div>';
}
}
}
},
legend: {
show: false
}
};
$.plot($('#chart'), data, options);
Html of the paceholder div:
<div id="#chart" style="margin: 40px 20px 20px 0px; padding: 0px;
position: relative; width:400px; height: 300px;"></div>
Upvotes: 3
Views: 473
Reputation: 8578
Apparently this got fixed with a newer combination of plugins (just as my other question here):
v0.7 to v0.8 of jquery.flot.js
and
v1.0 to v1.1 of jquery.flot.pie.js
Upvotes: 1