Fast Food Chain Popularity in 2011

<!–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’, 34170],
[‘Subway’, 11430],
[‘Starbucks’, 8490],
[‘Burger King’, 8130],
[‘Wendys’, 8108],
[‘Taco Bell’, 7000],
[‘Pizza Hut’, 5500],
[‘Dundin Donuts’, 5931],
[‘KFC’, 4600],

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

// 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 2011

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