f
This commit is contained in:
+29
-18
@@ -1,21 +1,32 @@
|
|||||||
<!DOCTYPE html>
|
<<html>
|
||||||
<html>
|
<head>
|
||||||
<head>
|
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
||||||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
<script type="text/javascript">
|
||||||
<script src="mainJs.js"></script>
|
google.charts.load('current', {'packages':['corechart']});
|
||||||
</head>
|
google.charts.setOnLoadCallback(drawChart);
|
||||||
|
|
||||||
<body>
|
function drawChart() {
|
||||||
<div id="piechart" style="width: 900px; height: 500px;">
|
|
||||||
</div>
|
|
||||||
<div id="chart_div"></div>
|
|
||||||
<br>
|
|
||||||
<div id="btn-group">
|
|
||||||
<button class="button button-blue" id="none">No Format</button>
|
|
||||||
<button class="button button-blue" id="scientific">Scientific Notation</button>
|
|
||||||
<button class="button button-blue" id="decimal">Decimal</button>
|
|
||||||
<button class="button button-blue" id="short">Short</button>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
|
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'
|
||||||
|
};
|
||||||
|
|
||||||
|
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
|
||||||
|
|
||||||
|
chart.draw(data, options);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="piechart" style="width: 900px; height: 500px;"></div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user