-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpizza.html
57 lines (46 loc) · 1.34 KB
/
pizza.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="pt-br"> <!-- idioma da pagina -->
<link rel="stylesheet" type="text/css" href="style.css"> <!-- Estilo da pagina -->
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <!-- CDN -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> <!-- CDN -->
<script src="dist/js/epoch.js"></script> <!-- arquivo js -->
<link rel="stylesheet" type="text/css" href="dist/css/epoch.css">
<!--arquivo css -->
<style>
.test .epoch {
width: 350px;
height: 350px;
}
</style>
</head>
<body>
<h1>Grafico de Pizza</h1>
<div id="test" class="test">
<p>
Cada cor com seus valores:
<ul>
<li>A - 20</li>
<li>B - 45</li>
<li>C - 35</li>
</ul>
</p>
<div class="epoch">
<!-- aqui ficara o grafico -->
</div>
</div>
<script>
$(function () {
$('#test .epoch').epoch({
type: 'pie',
data: [
{ label: 'A', value: 20 },
{ label: 'B', value: 45 },
{ label: 'C', value: 35 }
]
});
});
</script>
</body>
</html>