Skip to content

Instantly share code, notes, and snippets.

@zain
Created October 4, 2013 10:53
Show Gist options
  • Select an option

  • Save zain/6824188 to your computer and use it in GitHub Desktop.

Select an option

Save zain/6824188 to your computer and use it in GitHub Desktop.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>
Google Visualization API Sample
</title>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['corechart']});
</script>
<script type="text/javascript">
function drawVisualization() {
var data = google.visualization.arrayToDataTable([
['0', 100, 129, 150, 150],
['1', 56, 95, 155, 278],
['2', 85, 179, 279, 400],
['3', 150, 266, 360, 495]
// Treat first row as data as well.
], true);
var options = {
title: 'Price per bedroom',
hAxis: {title: 'Bedrooms'},
vAxis: {title: 'Price ($)'},
legend:'none'
};
var chart = new google.visualization.CandlestickChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<body>
<div id="chart_div" style="width: 1024px; height: 768px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment