-
Notifications
You must be signed in to change notification settings - Fork 0
/
poc_chart.html
36 lines (32 loc) · 1.31 KB
/
poc_chart.html
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
31
32
33
34
35
36
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
// Load google charts
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
// Draw the chart and set the chart values
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Year', 'Sales', 'Expenses'],
['2004', 1000, 400],
['2005', 1170, 460],
['2006', 660, 1120],
['2007', 1030, null]
]);
// Optional: redraw the chart. Add a title and set the width and height of the chart
var options = {
title: 'Company Performance',
curveType: 'function',
legend: { position: 'bottom' }
};
var chart = new google.visualization.LineChart(document.getElementById('linechart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<h1>--- Chart ---</h1>
<div id="linechart_div" style="width: 900px; height: 500px"></div>
</body>
</html>