1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
4 <title>Juegos Pasados
</title>
5 <style type=
"text/css">
12 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
28 <script type=
"text/javascript">
30 var canvas = document.getElementById('theCanvas');
31 var context = canvas.getContext('
2d');
41 ["Socially Inept",
25],
46 ["Crizz_ToonZurfex",
11],
47 ["o0 IDA IK1NG
0o",
4],
77 for(var i=
0;i<=
60;i+=
10){
79 context.strokeStyle = "rgb(
225,
225,
225)";
81 context.moveTo(
0,
400-
15-(i*
5));
82 context.lineTo(
4100,
400-
15-(i*
5));
87 for(var i =
0;i < users.length; i++){
89 gradient = context.createLinearGradient(
100*i,
400,
100*i,
400-(users[i][
1]*
5));
90 gradient.addColorStop(
0, "rgb(
34,
34,
34)");
91 gradient.addColorStop(
1, "rgb(
43,
43,
43)");
93 context.fillStyle = gradient;
94 context.fillRect (
100*i,
400-
15-(users[i][
1]*
5),
100,(users[i][
1]*
5)+
15);
96 context.font = "
8pt Helvetica";
97 context.fillStyle = "rgb(
255,
255,
255)";
98 context.fillText(users[i][
0], (
100*i)+
5,
400-(users[i][
1]*
5));
99 context.fillStyle = "rgb(
204,
0,
0)";
100 context.fillText("("+users[i][
1]+")", (
100*i)+
5,
400-
20-(users[i][
1]*
5));
106 <body onload=
"draw();">
108 <h1>Juegos Pasados Per Capita. (
2009)
</h1>
109 <canvas id=
"theCanvas" width=
"4100px" height=
"400px"></canvas>