开发者

Why did my Google Visualisation piecharts stop working?

I'm having a开发者_StackOverflow社区 weird problem with some PieCarts I created with the Google Visualisation API. They worked fine a couple of weeks ago, but not anymore. I have no idea why. My usage is really simple and basic:

var chart1_data = new google.visualization.DataTable(doctypeDataTable);
var chart1_view = new google.visualization.DataView(chart1_data);
chart1_view.setColumns([1, 2]);
var chart1 = new google.visualization.PieChart(document.getElementById('chart1'));
chart1.draw(chart1_view, {width: width, height: height, is3D: false, title: 'Document types'});

doctypeDataTable is a JSON array, of course. The chart renders, except for the actual pie part. I get the chart headers and the legend and everything, but not the actual slices of the pie.

I have tried on a few different computers and in different browsers (Firefox, Epiphany, disabling all my plugins) but with no result.

Full page is here: http://scantool.jejik.com/domains/view/2

Can anyone tell me what broke? I've been hitting a wall for several hours now. Thanks in advance!


I finally found the answer. It was a bug in Google Visualisations. One part of the pie chart was much bigger than the other parts combined (16.000 for one slice, versus just a handful on the other slices). This caused the pie chart vsiualisation to fail.

Google has promised to fix it in their next release. In the mean time, I worked around it by converting my data to percentages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜