I'm using Google Charts
to show some data regarding opens and clicks from emails as Pie Charts. I've got the Pie Charts showing the right data, however I'm having issues with the label on the pie chart.
I'm not sure why, but it's mis-aligned - it's decided that the label should not be in the middle of the slice like usual (Left Picture).
Interestingly enough, even though most of the time I've seen it misaligned, I have noticed the text aligns itself correctly a few times for the top slice (mainly when I've just made changes to the code) but then it goes back to being at the edge of the slice after refreshing (Right Picture).
Does anyone know how to get the positioning correct for these or if there's something I'm doing that's knocking out the positioning?
function drawPieChartOpens()
{
var data = new google.visualization.arrayToDataTable([
['Opens','Count'],
['Opens',3988],
['Non Opens',21145]
]);
var options = {
'width':200,
'height':300,
'legend':'none',
colors: ['#00933B','#DDDDDD'],
slices: {0: {offset: 0.2}},
'chartArea':{width:'100%'}
};
var chart = new google.visualization.PieChart(document.getElementById('opens-2782714'));
chart.draw(data, options);
}
google.setOnLoadCallback(drawPieChartOpens);