-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo.html
94 lines (82 loc) · 3.07 KB
/
demo.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
89
90
91
92
93
<!--
/**
* Created by IntelliJ IDEA.
* User: Vladi.m
* Date: 5/25/2016
* Time: 10:00 PM
*/
-->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Morris toggle wrapper demo</title>
<!--Morris-->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
<!--end of Morris-->
<!-- morris toggle plugin -->
<script src="mta.js" type="text/javascript"></script>
<!-- **** -->
</head>
<body>
<div id="line_mta_graph"></div>
<div id="bar_mta_graph"></div>
<div id="donut_mta_graph"></div>
<script>
jQuery(function() {
window.morrisLineGraph = MTA.Line({
//Morris configuration obj
element: 'line_mta_graph',
data: [
{year: '2006', a: 100, str: 90, c: 80, d: 70},
{year: '2007', a: 75, str: 65, c: 55, d: 45},
{year: '2008', a: 50, str: 40, c: 30, d: 20},
{year: '2009', a: 75, str: 65, c: 55, d: 45},
{year: '2010', a: 50, str: 40, c: 30, d: 20},
{year: '2011', a: 75, str: 65, c: 55, d: 45},
{year: '2012', a: 100, str: 90, c: 80, d: 70}
],
xkey: 'year',
ykeys: ['a', 'str', 'c', 'd'],
labels: ['Series A', 'Series Str', 'Series C', 'Series D']
},
true // draw toggle checkbox buttons
);
window.morrisBarGraph = MTA.Bar({
//Morris configuration obj
element: 'bar_mta_graph',
data: [
{year: '2006', a: 100, b: 90},
{year: '2007', a: 75, b: 65},
{year: '2008', a: 50, b: 40},
{year: '2009', a: 75, b: 65},
{year: '2010', a: 50, b: 40},
{year: '2011', a: 75, b: 65},
{year: '2012', a: 100, b: 90}
],
xkey: 'year',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B']
},
true // draw toggle checkbox buttons
);
window.morrisDonutGraph = MTA.Donut({
//Morris configuration obj
element: 'donut_mta_graph',
data: [
{label: "Download Sales", value: 12},
{label: "In-Store Sales", value: 30},
{label: "Mail-Order Sales", value: 20}
],
xkey: 'year',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B']
}
);
});
</script>
</body>
</html>