https://developers.google.com/chart/interactive/docs/gallery



선형 차트

<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([
         
['Year', 'Sales', 'Expenses'],
         
['2004',  1000,      400],
         
['2005',  1170,      460],
         
['2006',  660,       1120],
         
['2007',  1030,      540]
       
]);

       
var options = {
          title
: 'Company Performance'
       
};

       
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
        chart
.draw(data, options);
     
}
   
</script>
 
</head>
 
<body>
   
<div id="chart_div" style="width: 900px; height: 500px;"></div>
 
</body>
</html>



'자바스크립트' 카테고리의 다른 글

jquery - select option 선택값 가져오기  (0) 2018.01.22
datepicker 특정요일  (0) 2018.01.14
구글지도 내위치  (0) 2017.12.31
jquery get 한글 깨짐  (0) 2017.12.30
카카오톡 친구 맺기  (0) 2017.12.29

+ Recent posts