Skip to content

anonymous /gist:3869184
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
<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() {
data.addColumn('number','Age');
data.addColumn('number','Weight');
data.addColumn({type:'string', role:'tooltip'});
var data = google.visualization.arrayToDataTable([
[ -10, 12,'bob'],
[ 4, 5.5,'sally'],
[ 11, 14,'marco'],
[ 4, 5,'elaine'],
[ 3, 3.5,'jillian'],
[ 6.5, 7,'maurice']
]);
var options = {
title: 'Age vs. Weight comparison',
hAxis: {title: 'Age', minValue: -11, maxValue: 15},
vAxis: {title: 'Weight', minValue: 0, maxValue: 15},
};
var chart = new google.visualization.ScatterChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.