Skip to content

Instantly share code, notes, and snippets.

@matthewfinnell
Created June 26, 2012 20:05
Show Gist options
  • Save matthewfinnell/2998538 to your computer and use it in GitHub Desktop.
Save matthewfinnell/2998538 to your computer and use it in GitHub Desktop.
Google Graph API Showing Minimum Wage Vs Inflation Adjusted Minimum Wage
function drawVisualization() {
// Some raw data
var data = google.visualization.arrayToDataTable([
['Year', 'Minimum Wage', 'Minimum Wage With Inflation Indexing'],
['1968', 1.60, 1.6],
['1974', 2.00, 2.27],
['1975', 2.10, 2.47],
['1976', 2.30, 2.62],
['1979', 2.90, 3.34],
['1980', 3.10, 3.79],
['1981', 3.35, 4.18],
['1990', 3.80, 6.01],
['1991', 4.25, 6.26],
['1996', 4.75, 7.21],
['1997', 5.15, 7.38],
['2007', 5.85, 9.53],
['2008', 6.55, 9.90],
['2009', 7.25, 9.86],
['2012', 7.25, 10.57]
]);
// Create and draw the visualization.
var ac = new google.visualization.AreaChart(document.getElementById('visualization'));
ac.draw(data, {
title : 'Minmum Wage Over Time',
isStacked: false,
width: 600,
height: 400,
vAxis: {title: "Wage"},
hAxis: {title: "Time"}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment