-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
32 lines (27 loc) · 1.42 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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>console tests</title>
</head>
<body>
<script src="./build/index.js"></script>
<script>
var tests = [{ values: [1, 1, 1], colors: ['red', 'blue', 'pink'], radius: 48, stroke: 4 },
{ values: [0, 0, 0], colors: ['red', 'blue', 'pink'], radius: 48, stroke: 4 },
{ values: [-1, 1, 2], colors: ['red', 'blue', 'pink'], radius: 48, stroke: 4 },
{ values: [1000, 999, 999], colors: ['red', 'blue', 'pink'], radius: 48, stroke: 4 },
{ values: [5000, 8345, 9999, 20000], colors: ['red', 'blue', 'pink'], radius: 48, stroke: 4 },
{ values: [5000, 8345, 9999], colors: ['red', 'blue', 'pink'], radius: 0, stroke: 4 },
{ values: [5000, 8345, 9999], colors: ['red', 'blue', 'pink'], radius: 50, stroke: -1 },
{ values: [5000, 8345, 9999], colors: ['#ccc', '#ddd', '#bbb'], radius: 50, stroke: 2 },
{ values: [5000, 8345, 9999], colors: ['#fff', 'green', 'white'], radius: 50, stroke: 2 },
{ values: [5000, 8345, 9999], colors: ['red', 'green', 'white'], radius: 50, stroke: 2 },
{ values: [5000, 8345, 9999], colors: ['red', 'green', 'white'], radius: 100, stroke: 5 }]
var svgCharts = svgCharts();
tests.forEach((testSet) => {
console.log(svgCharts.generatePieChartSVG(testSet.values, testSet.colors, testSet.radius, testSet.stroke));
})
</script>
</body>
</html>