-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
executable file
·88 lines (83 loc) · 1.74 KB
/
index.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<html>
<head>
<meta charset="UTF-8">
<style>
body {
padding: 0;
margin: 0;
}
canvas{
margin: auto;
display: block;
}
textarea{
width: 300px;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 2;
}
</style>
</head>
<body>
<canvas id="mycanvas"></canvas>
<textarea class="debug"></textarea>
<script language="javascript" type="text/javascript" src="sketch.js"></script>
<script>
var config = {
canvas: "mycanvas",
cw: 800,
ch: 800,
fontSize: 11,
labelLineWidth: 10,
labelLineHeight: 4,
labelLineOffset: 4,
labelStrokeWeight: 1,
labelColor: "#111111",
outSideLineWidth: 10,
donutWith: 40,
radius: 200,
hoverOpacPercent:0.2,
secondColorOpacPercent:0.6,
values: [],
onhover: function () { },
values:[
{
max:11,
current:1,
currentColor:'#31C820',
labelText:" %m JAVA %c Javascript"
},
{
max:14,
current:3,
currentColor:'#DA0036',
labelText:"ANDROİD"
},
{
max:10,
current:5,
currentColor:'#291FCC',
labelText:"IOS"
},
{
max:20,
current:5,
currentColor:'#2C6981',
labelText:"SWİFT"
}
]
}
var c = new Chart(config)
c.draw()
console.log(c)
var d = document.querySelector('.debug')
d.addEventListener('change',function (e) {
var nc = JSON.parse(d.value)
c.update(nc)
})
document.querySelector('.debug').innerHTML = JSON.stringify(config, 2,2)
</script>
</body>
</html>