Fast Food Chain Popularity in 2010

<!–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’, 32395.4],
[‘Subway’, 10633],
[‘Starbucks’, 7955],
[‘Burger King’, 8433],
[‘Wendys’, 7943],
[‘Taco Bell’, 6900],
[‘Pizza Hut’, 5400],
[‘Dundin Donuts’, 5420],
[‘KFC’, 4700],

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

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

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