-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.html
33 lines (33 loc) · 817 Bytes
/
test.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
<html>
<head>
<style>
.chart-item-bg {stroke: #ddd}
.chart-item-0 {stroke: #dd0000}
.chart-item-1 {stroke: #00cc00}
.chart-item-2 {stroke: #0000ff}
</style>
</head>
<body>
<div id="mychart">Chart: </div>
</body>
<script type="text/javascript" src="donut-chart.js"></script>
<script type="text/javascript">
var chart_div = document.getElementById("mychart")
var mychart = new DonutChart(chart_div, {
r: 60,
stroke: 16,
scale: 100,
items: [
{ label: "A", value: .2 },
{ label: "B", value: .1 },
{ label: "C", value: .5 },
]
})
mychart.update({
items: [
{ label: "J", value: .4 },
{ label: "Q", value: .3 },
]
})
</script>
</html>