Slide 10
Slide 10 text
Using a Library
Drawing the chart
Flotr.draw(
document.getElementById("chart"),
[
{ data: pacific, label: "Pacific", points: {show:true} },
{ data: europe, label: "Europe", points: {show:true} },
{ data: americas, label: "Americas", points: {show:true} },
{ data: mideast, label: "Middle East", points: {show:true} },
{ data: asia, label: "Asia", points: {show:true} },
{ data: us, label: "United States", points: {show:true} }
],{
title: "Life Expectancy vs. Health Care Spending",
subtitle: "(by Country, 2010 OECD data)",
xaxis: {min: 5, max: 25, tickDecimals: 0,
title: "Spending as Percentage of GDP",
tickFormatter: function(val) {return val+"%"}},
yaxis: {min: 70, max: 85, tickDecimals: 0, title: "Years"},
legend: {position: "ne"}
}
);