What Charting API / Tool is this? [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question 开发者_高级运维What Charting API / Tool is this?
http://wordpress.org/extend/plugins/multiple-post-thumbnails/stats/
The pie chart at least is an svg canvas inside of an iframe. i am confused what they are using, but I like it.
image http://img38.imageshack.us/img38/6513/picturets.png
google.load("visualization", "1", {packages: ["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
jQuery.getJSON('http://api.wordpress.org/stats/plugin/1.0/multiple-post-thumbnails?callback=?', function (data) {
draw_graph(data, 'version_stats', 'Active Versions');
});
}
function draw_graph(versions, id, title) {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Version');
data.addColumn('number', 'Usage');
var count = 0;
jQuery.each(versions, function (key, value) {
if (Number(value) > 1) {
data.addRow();
data.setValue(count, 0, key);
data.setValue(count, 1, Number(value));
count++;
}
});
var chart = new google.visualization.PieChart(document.getElementById(id));
chart.draw(data, {width: 360, height: 240, title: title});
}
It looks like they are using Google's charting API: http://code.google.com/apis/chart/interactive/docs/index.html
精彩评论