-
Notifications
You must be signed in to change notification settings - Fork 7
/
scenario5.html
50 lines (48 loc) · 1.24 KB
/
scenario5.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
<!DOCTYPE html>
<html>
<head>
<title>T20 Match</title>
</head>
<body>
<h1>Board of Control for Cricket in India</h1>
<h3>T20 Cricket Match Statistics</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 = 1.5;
ctx.strokeText("Runs ^",32,20);
ctx.strokeText("240-",0,20);
ctx.strokeText("210-",0,70);
ctx.strokeText("180-",0,120);
ctx.strokeText("150-",0,170);
ctx.strokeText("120-",0,220);
ctx.strokeText("60 -",0,270);
ctx.strokeText("30 -",0,320);
ctx.strokeText("0 -",0,370);
ctx.moveTo(30,400);
ctx.lineTo(30,0);
ctx.moveTo(0,370);
ctx.lineTo(500,370);
ctx.stroke();
ctx.strokeText("|",130,380);
ctx.strokeText("5",130,395);
ctx.strokeText("|",230,380);
ctx.strokeText("10",230,395);
ctx.strokeText("|",330,380);
ctx.strokeText("15",330,395);
ctx.strokeText("|",430,380);
ctx.strokeText("20",430,395);
ctx.strokeText("Overs ->",435,370);
ctx.moveTo(130, 303); //(5,40)
ctx.lineTo(230, 245); //(10,75)
ctx.moveTo(230, 245);
ctx.lineTo(330, 187); //(15,140)
ctx.moveTo(330, 187);
ctx.lineTo(430, 70);
ctx.stroke();
</script>
</body>
</html>