-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
147 lines (133 loc) · 4.46 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="favicon.png">
<title>Snapcharts, a simple chart library using snap.svg</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Site css -->
<link href="css/prism.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Wrap all page content here -->
<div id="wrap">
<!-- Begin page content -->
<div class="container">
<div class="page-header">
<h1>Snapcharts</h1>
<p>Snapcharts is a small open source charting library built on top of <a href="http://snapsvg.io">snap.svg</a>. It is currently a work in progress and should not be used by anyone for anything yet.</p>
<p><a href="https://github.com/svnv/snapcharts">You can find the github repository for snapcharts here</a>.</p>
<p>Snapcharts is available under an Apache 2 license.</p>
</div>
<h2>Bar chart</h2>
<p class="lead">A bar chart with 2 columns per datapoint.</p>
<div id="bar-chart" class="chart">
</div>
<pre><code class="language-javascript">
var options = {
type:'bar',
labels:['jan','feb','mar','apr','may','jun','jul','aug'],
data:[{
values: [0.9, 0.2, 0.4, 0.35, 0.37, 0.50, 0.50,0.50],
color: 'rgba(0,175,255,.5)'
},
{
values: [ 0.10, 0.25, 0.6, 0.7, 0.4, 0.9, 0.7, 0.8],
color: 'rgba(0,255,235,.6)',
}
]
};
var chart = new SnapChart('#bar-chart',options);
</code></pre>
<h2>Line chart</h2>
<p class="lead">A line chart with two data series.</p>
<div id="line-chart" class="chart">
</div>
<pre><code class="language-javascript">
var options = {
type:'line',
labels:['jan','feb','mar','apr','may','jun','jul','aug'],
data:[
{
values: [ 0.90, 0.20, 0.40, 0.35, 0.37, 0.50, 0.50, 0.50],
color: 'rgba(0,175,255,.6)'
},
{
values: [ 0.10, 0.25, 0.6, 0.7, 0.4, 0.9, 0.7, 0.8],
color: 'rgba(0,255,235,.6)'
}
]
};
var chart = new SnapChart('#line-chart',options);
</code></pre>
<h2>Area chart</h2>
<p class="lead">An area chart with overlapping areas.</p>
<div id="area-chart" class="chart">
</div>
<pre><code class="language-javascript">
var options = {
type:'area',
labels:['jan','feb','mar','apr','may','jun','jul','aug'],
data:[
{
values: [0.90,0.20,0.40,0.35,0.37,0.50,0.50,0.50],
color: 'rgba(0,175,255,.3)',
},
{
values: [ 0.10, 0.25, 0.6, 0.7, 0.4, 0.9, 0.7, 0.8],
color: 'rgba(0,255,235,.3)',
}
]
};
var chart = new SnapChart('#area-chart',options);
</code></pre>
<h2>Pie chart</h2>
<p class="lead">A pie chart with fill patterns and a legend.</p>
<div id="pie-chart" class="chart"></div>
<div id="legend"></div>
<pre><code class="language-javascript">
var options = {
type:'pie',
data:[{
name: 'Segment A',
values: [0.1],
color: 'rgba(0,175,255,.6)',
pattern:'triangles'
},
{
name: 'Segment B',
values: [0.2],
color: 'rgba(0,175,255,.4)',
pattern:'stripes'
},
{
name: 'Segment C',
values: [0.255],
color: 'rgba(0,175,255,.2)',
pattern:'dots'
}]
};
var chart = new SnapChart('#pie-chart',options);
var legend = new SnapLegend('#legend',options);
</code></pre>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/JavaScript" src="js/snap.svg.js"></script>
<script type="text/JavaScript" src="js/snapchart.js"></script>
<script type="text/JavaScript" src="js/prism.js"></script>
<script type="text/JavaScript" src="js/app.js"></script>
</body>
</html>