0
我想有一個響應谷歌餅圖。響應谷歌Piechart
我已經是 -
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart()
{
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options = {
title: 'My Daily Activities',
is3D: true,
animation:
{
duration: 1000,
easing: 'in',
},
width: '100%',
height: '100%',
legend:'none',
pieSliceText: 'percentage',
chartArea:
{
left: "0%",
top: "0%",
height: "100%",
width: "100%"
}
};
var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div style="width: 100%; height: 100%;">
<div id="piechart_3d" style="width: inherit; height: inherit;"></div>
</div>
</body>
</html>
做,但它沒有響應。
任何人都可以幫助我嗎?
我不知道這件事,但你肯定谷歌API可以產生響應圖表?也許在問題中添加API文檔的鏈接以幫助其他用戶。 – kebs
是的,我確定。 但如果沒有,請給我任何其他rsponive餅圖請@kebs –