Skip to content

Instantly share code, notes, and snippets.

@ReptarAzar
Created May 22, 2014 02:46
Show Gist options
  • Save ReptarAzar/174583c7ad3910d013b3 to your computer and use it in GitHub Desktop.
Save ReptarAzar/174583c7ad3910d013b3 to your computer and use it in GitHub Desktop.
A Pen by Christopher Azar.
<h3>Cancer is the number two killer in the US <sup><a href="#footnotes">1</a></sup> and the number one killer worldwide.</h3><p>In 2013, about 1,660,290 new cancer cases were expected to be diagnosed and about 580,350 Americans were expected to die of cancer. That's almost 1,600 deaths per day.<sup><a href="#footnotes">2</a></sup> Cancer causes one in four American deaths. Holy fuck. </p>
<div id="piechart" style="width: 900px; height: 500px;"></div>
<div id="footnotes"></div>
<p></p>
<p>1. Heart disease is number one. Source: Center for disease control and prevention <a href="http://www.cdc.gov/nchs/fastats/lcod.htm">http://www.cdc.gov/nchs/fastats/lcod.htm</a></p>
<p>2. "Cancer Facts and Figures" <u>American Cancer Society Inc.</u> <a href="http://www.cancer.org/acs/groups/content/@epidemiologysurveilance/documents/document/acspc-036845.pdf">http://www.cancer.org/</a></p>
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Causes', 'Percent'],
['Tobacco', 30],
['Diet & Exercise', 30],
['Sun Exposure', 4],
['Alcohol', 2],
['Genetic', 1],
]);
var options = {
// legend: 'none',
pieSliceText: 'label',
title: 'Causes of Cancer',
pieStartAngle: 100,
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
body {
font-family: sans-serif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment