Fast Food Chain Popularity in 2009

<!–Load the AJAX API–>

// Load the Visualization API and the corechart package.
google.charts.load(‘current’, {‘packages’:[‘corechart’]});

// Set a callback to run when the Google Visualization API is loaded.

// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {

// Create the data table.
var data = new google.visualization.DataTable();
data.addColumn(‘string’, ‘Franchise’);
data.addColumn(‘number’, ‘Revenue’);
[‘McDonalds’, 31032.6],
[‘Subway’, 9999.3],
[‘Starbucks’, 7415],
[‘Burger King’, 8799],
[‘Wendys’, 8023],
[‘Taco Bell’, 6800],
[‘Pizza Hut’, 5000],
[‘Dundin Donuts’, 5176],
[‘KFC’, 4900],

// Set chart options
var options = {‘title’:’Fast Food Chain Popularity in 2009′,

// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById(‘chart_div’));
chart.draw(data, options);


<!–Div that will hold the pie chart–>



One thought on “Fast Food Chain Popularity in 2009

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s