-
Notifications
You must be signed in to change notification settings - Fork 7
/
scenario4.html
59 lines (58 loc) · 1.6 KB
/
scenario4.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
<title>Agricultural Statistics</title>
</head>
<body>
<h1>Agricultural Statistical Department of GOI</h1>
<h3>Yield of Bajra from 2001 to 2007</h3>
<canvas id="myCanvas" width="500" height="400" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.font = "15px Arial";
ctx.lineWidth = 2;
ctx.strokeText("Lakh Tonnes",32,20);
ctx.strokeText("700 -",0,20);
ctx.strokeText("600 -",0,70);
ctx.strokeText("500 -",0,120);
ctx.strokeText("400 -",0,170);
ctx.strokeText("300 -",0,220);
ctx.strokeText("200 -",0,270);
ctx.strokeText("100 -",0,320);
ctx.strokeText("0 -",0,370);
ctx.moveTo(30,400);
ctx.lineTo(30,0);
ctx.moveTo(0,370);
ctx.lineTo(500,370);
ctx.strokeText("|",80,380);
ctx.strokeText("2001",80,390);
ctx.strokeText("|",130,380);
ctx.strokeText("2002",130,390);
ctx.strokeText("|",180,380);
ctx.strokeText("2003",180,390);
ctx.strokeText("|",230,380);
ctx.strokeText("2004",230,390);
ctx.strokeText("|",280,380);
ctx.strokeText("2005",280,390);
ctx.strokeText("|",330,380);
ctx.strokeText("2006",330,390);
ctx.strokeText("|",380,380);
ctx.strokeText("2007",380,390);
ctx.moveTo(80,230); //(2001, 281)
ctx.lineTo(130,235);
ctx.moveTo(130,235); //(2002, 277)
ctx.lineTo(180,240);
ctx.moveTo(180,240); //(2003, 275)
ctx.lineTo(230,140);
ctx.moveTo(230,140); //(2004, 457)
ctx.lineTo(280,270);
ctx.moveTo(280,270); //(2005, 200)
ctx.lineTo(330,230);
ctx.moveTo(330,230); //(2006, 280)
ctx.lineTo(380,290); //(2007, 150)
ctx.stroke();
</script>
</body>
</html>