Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- Eclipse
- vaadin
- IntelliJ
- Spring
- Java
- mybatis
- MSSQL
- es6
- SSL
- GIT
- mapreduce
- SQL
- Android
- Python
- xPlatform
- R
- Kotlin
- 공정능력
- NPM
- tomcat
- Express
- SPC
- hadoop
- JavaScript
- Sqoop
- 보조정렬
- react
- window
- table
- plugin
Archives
- Today
- Total
DBILITY
google chart sample 본문
반응형
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!--<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>-->
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
</head>
<body>
<h2>Draw Graph using Google Chart</h2>
<h3>Vote for Favorite fruits</h3>
<div id="chartDiv" style="height:500px"></div>
<script>
var fruitsData = [
['Kinds', 'Count'],
['Apple', 3], ['Banana', 4], ['Orange', 5], ['Strawberry', 1], ['Watermelon', 3], ['melon', 3]
];
var drawBasic = function() {
var data = google.visualization.arrayToDataTable(fruitsData);
var options = {title: 'Favorite Fruits', 'is3D': true};
var chart = new google.visualization.PieChart(document.getElementById('chartDiv'));
console.log(data);
console.log(options);
console.log(chart);
chart.draw(data, options);
};
google.charts.load('current', {packages: ['corechart']});
google.charts.setOnLoadCallback(drawBasic);
</script>
</body>
</html>
반응형
'front-end & ui > html' 카테고리의 다른 글
| web pdf viewer iframe toolbar disable ( pdf 툴바 제거 ) (0) | 2023.01.12 |
|---|
Comments