├── .gitignore
├── site
├── assets
│ ├── html.png
│ ├── simple.png
│ ├── 6charts.png
│ ├── effects.js
│ └── excanvas.js
├── styles.css
└── index.html
├── component.json
├── readme.md
├── samples
├── pie.html
├── doughnut.html
├── bar.html
├── polarArea.html
├── line.html
├── radar.html
└── sixup.html
├── LICENSE.md
├── docs
├── prettify.less
├── prettify.css
├── styles.less
├── styles.css
├── prettify.js
└── index.html
├── Chart.min.js
└── Chart.js
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/site/assets/html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wikunia/Chart.js/master/site/assets/html.png
--------------------------------------------------------------------------------
/site/assets/simple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wikunia/Chart.js/master/site/assets/simple.png
--------------------------------------------------------------------------------
/site/assets/6charts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wikunia/Chart.js/master/site/assets/6charts.png
--------------------------------------------------------------------------------
/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Chart.js",
3 | "version": "0.2.0",
4 | "description": "Simple HTML5 Charts using the canvas element",
5 | "keywords": ["charts"],
6 | "homepage": "https://github.com/nnnick/Chart.js",
7 | "author": "nnnick",
8 | "main": ["Chart.min.js"],
9 | "dependencies": {
10 | }
11 | }
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | Chart.js
2 | =======
3 | *Simple HTML5 Charts using the canvas element* [chartjs.org](http://www.chartjs.org)
4 |
5 | Competition!
6 | -------
7 | The guys at ChallengePost are running a competition to design and build a personal dashboard using Chart.js, and are offering some great prizes for winning. Take a look at [chartjs.challengepost.com](http://chartjs.challengepost.com/).
8 |
9 | Documentation
10 | -------
11 | You can find documentation at [chartjs.org/docs](http://www.chartjs.org/docs).
12 |
13 | License
14 | -------
15 | Chart.js was taken down on the 19th March. It is now back online for good and IS available under MIT license.
16 |
17 | Chart.js is available under the [MIT license] (http://opensource.org/licenses/MIT).
18 |
--------------------------------------------------------------------------------
/samples/pie.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Radar Chart
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/samples/doughnut.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Doughnut Chart
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/samples/bar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bar Chart
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/samples/polarArea.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Polar Area Chart
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Nick Downie
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/samples/line.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Line Chart
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/samples/radar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Radar Chart
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/docs/prettify.less:
--------------------------------------------------------------------------------
1 | /* Pretty printing styles. Used with prettify.js. */
2 | /* Vim sunburst theme by David Leibovic */
3 |
4 | pre .str{ color: #65B042; } /* string - green */
5 | pre .kwd{ color: #E28964; } /* keyword - dark pink */
6 | pre .com{ color: #AEAEAE; font-style: italic; } /* comment - gray */
7 | pre .typ{ color: #89bdff; } /* type - light blue */
8 | pre .lit{ color: #3387CC; } /* literal - blue */
9 | pre .pun{ color: #fff; } /* punctuation - white */
10 | pre .pln{ color: #fff; } /* plaintext - white */
11 | pre .tag{ color: #89bdff; } /* html/xml tag - light blue */
12 | pre .atn{ color: #bdb76b; } /* html/xml attribute name - khaki */
13 | pre .atv{ color: #65B042; } /* html/xml attribute value - green */
14 | pre .dec{ color: #3387CC; } /* decimal - blue */
15 |
16 | /* Specify class=linenums on a pre to get line numbering */
17 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */
18 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
19 | /* Alternate shading for lines */
20 | li.L1,li.L3,li.L5,li.L7,li.L9 { }
21 |
22 | @media print {
23 | pre .str{ color: #060; }
24 | pre .kwd{ color: #006; font-weight: bold; }
25 | pre .com{ color: #600; font-style: italic; }
26 | pre .typ{ color: #404; font-weight: bold; }
27 | pre .lit{ color: #044; }
28 | pre .pun{ color: #440; }
29 | pre .pln{ color: #000; }
30 | pre .tag{ color: #006; font-weight: bold; }
31 | pre .atn{ color: #404; }
32 | pre .atv{ color: #060; }
33 | }
--------------------------------------------------------------------------------
/docs/prettify.css:
--------------------------------------------------------------------------------
1 | /* Pretty printing styles. Used with prettify.js. */
2 | /* Vim sunburst theme by David Leibovic */
3 |
4 | pre .str, code .str { color: #65B042; } /* string - green */
5 | pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */
6 | pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */
7 | pre .typ, code .typ { color: #89bdff; } /* type - light blue */
8 | pre .lit, code .lit { color: #3387CC; } /* literal - blue */
9 | pre .pun, code .pun { color: #fff; } /* punctuation - white */
10 | pre .pln, code .pln { color: #fff; } /* plaintext - white */
11 | pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */
12 | pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */
13 | pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */
14 | pre .dec, code .dec { color: #3387CC; } /* decimal - blue */
15 |
16 | pre.prettyprint, code.prettyprint {
17 | background-color: #000;
18 | -moz-border-radius: 8px;
19 | -webkit-border-radius: 8px;
20 | -o-border-radius: 8px;
21 | -ms-border-radius: 8px;
22 | -khtml-border-radius: 8px;
23 | border-radius: 8px;
24 | }
25 |
26 | pre.prettyprint {
27 | width: 95%;
28 | margin: 1em auto;
29 | padding: 1em;
30 | white-space: pre-wrap;
31 | }
32 |
33 |
34 | /* Specify class=linenums on a pre to get line numbering */
35 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */
36 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
37 | /* Alternate shading for lines */
38 | li.L1,li.L3,li.L5,li.L7,li.L9 { }
39 |
--------------------------------------------------------------------------------
/docs/styles.less:
--------------------------------------------------------------------------------
1 | @import "prettify";
2 |
3 | @codeBackground : #292B36;
4 |
5 | @primaryFont : "proxima-nova";
6 |
7 | @textColour : #282B36;
8 | @secondaryTextColour : #767c8d;
9 |
10 | @borderPaleColour : #EBEBEB;
11 | @pageBorderColour : @textColour;
12 |
13 | @red : #F33E6F;
14 | @green : #46BFBD;
15 | @yellow : #FDB45C;
16 | @blue : #2D91EA;
17 |
18 | *{
19 | padding:0;
20 | margin:0;
21 | box-sizing:border-box;
22 | -moz-box-sizing:border-box;
23 | -webkit-box-sizing:border-box;
24 | color:inherit;
25 | text-rendering: optimizeLegibility;
26 | }
27 |
28 | body{
29 | color: @textColour;
30 | min-width: 768px;
31 | }
32 |
33 | .redBorder,.greenBorder,.yellowBorder{
34 | border-top: 8px solid @pageBorderColour;
35 | width: 33.33%;
36 | float: left;
37 | height: 16px;
38 | position: relative;
39 | z-index:50;
40 | }
41 | .redBorder{
42 | background-color: @red;
43 | }
44 | .greenBorder{
45 | background-color: @green;
46 | }
47 | .yellowBorder{
48 | background-color: @yellow;
49 | }
50 |
51 | h1{
52 | font-family: @primaryFont;
53 | font-weight: 600;
54 | font-size: 32px;
55 | }
56 | h2{
57 | font-family: @primaryFont;
58 | font-weight: 600;
59 | font-size: 22px;
60 | line-height: 40px;
61 | }
62 | #mainHeader{
63 | font-size: 55px;
64 | }
65 | #introText{
66 | font-weight: 400;
67 | margin-top: 20px;
68 | font-size: 26px;
69 | line-height: 40px;
70 | margin-bottom: 40px;
71 | }
72 | #wrapper{
73 | margin: 0 auto;
74 | position: relative;
75 | min-width: 768px;
76 | nav{
77 | width: 20%;
78 | padding-right: 20px;
79 | position: fixed;
80 | height: 100%;
81 | overflow-y: scroll;
82 | top: 0;
83 | z-index: 0;
84 | padding: 40px 20px;
85 | font-family: @primaryFont;
86 | background-color: @borderPaleColour;
87 |
88 | dl{
89 | color: @secondaryTextColour;
90 | dt{
91 | list-style: none;
92 | margin-top: 10px;
93 | margin-bottom: 5px;
94 | a{
95 | display: block;
96 | padding: 2px 0;
97 | border-bottom: 1px solid fade(@secondaryTextColour,20%);
98 | text-decoration: none;
99 | }
100 | }
101 | dd{
102 | margin-bottom: 5px;
103 | padding-left: 5px;
104 | &:before{
105 | content: "- ";
106 |
107 | }
108 | a{
109 | text-decoration:none;
110 | font-size: 12px;
111 | border-bottom: 1px solid transparent;
112 | }
113 | }
114 | a{
115 | -webkit-transition: all 200ms ease-in-out;
116 | -moz-transition: all 200ms ease-in-out;
117 | -o-transition: all 200ms ease-in-out;
118 | -ms-transition: all 200ms ease-in-out;
119 | transition: all 200ms ease-in-out;
120 | &:hover{
121 | color: @blue;
122 | border-bottom-color:@blue;
123 | }
124 | }
125 |
126 | }
127 | }
128 | #contentWrapper{
129 | width: 80%;
130 | max-width: 1080px;
131 | margin-left: 20%;
132 | padding: 0px 40px;
133 | padding-top: 72px;
134 | }
135 | }
136 | article{
137 | border-top: 1px solid @borderPaleColour;
138 | padding: 40px 0;
139 | h2{
140 | margin-top: 20px;
141 | }
142 | }
143 |
144 | p,ul li{
145 | font-family: @primaryFont;
146 | line-height: 20px;
147 | font-size: 16px;
148 | margin-top: 10px;
149 | color: @secondaryTextColour;
150 | a{
151 | text-decoration: none;
152 | border-bottom: 1px solid @blue;
153 | color: @blue;
154 | }
155 | }
156 |
157 | canvas{
158 | margin-top: 20px;
159 | }
160 | pre{
161 | background-color: @codeBackground;
162 | padding: 10px;
163 | border-radius: 5px;
164 | position: relative;
165 | -webkit-font-smoothing: antialiased;
166 | margin: 40px 0 20px 0;
167 | code{
168 | display: block;
169 | }
170 | &:before{
171 | content: attr(data-type);
172 | position: absolute;
173 | font-size: 12px;
174 | top: -30px;
175 | left: 0;
176 | font-family: @primaryFont;
177 | font-weight: 400;
178 | display: inline-block;
179 | padding: 2px 5px;
180 | border-radius: 5px;
181 | background-color: @borderPaleColour;
182 | }
183 | }
184 | p{
185 | }
--------------------------------------------------------------------------------
/samples/sixup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Doughnut Chart
5 |
6 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
154 |
155 |
156 |
--------------------------------------------------------------------------------
/site/styles.css:
--------------------------------------------------------------------------------
1 | * {
2 | padding: 0;
3 | margin: 0;
4 | color: inherit;
5 | -webkit-font-smoothing: antialiased;
6 | text-rendering: optimizeLegibility;
7 | }
8 | body {
9 | color: #282b36;
10 | border-top: 8px solid #282b36;
11 | }
12 | canvas {
13 | font-family: "proxima-nova", sans-serif sans-serif;
14 | }
15 | .redBorder,
16 | .greenBorder,
17 | .yellowBorder {
18 | width: 33.33%;
19 | float: left;
20 | height: 8px;
21 | }
22 | .redBorder {
23 | background-color: #f33e6f;
24 | }
25 | .greenBorder {
26 | background-color: #46bfbd;
27 | }
28 | .yellowBorder {
29 | background-color: #fdb45c;
30 | }
31 | h1 {
32 | font-family: "proxima-nova", sans-serif;
33 | font-weight: 600;
34 | font-size: 55px;
35 | margin-top: 40px;
36 | }
37 | h2 {
38 | font-family: "proxima-nova", sans-serif;
39 | font-weight: 400;
40 | margin-top: 20px;
41 | font-size: 26px;
42 | line-height: 40px;
43 | }
44 | h3 {
45 | font-family: "proxima-nova", sans-serif;
46 | font-weight: 600;
47 | text-align: center;
48 | margin: 20px 0;
49 | }
50 | h3 a {
51 | color: #2d91ea;
52 | text-decoration: none;
53 | border-bottom: 1px solid #2d91ea;
54 | }
55 | p {
56 | font-family: "proxima-nova", sans-serif;
57 | line-height: 24px;
58 | font-size: 18px;
59 | color: #767c8d;
60 | }
61 | .btn {
62 | display: inline-block;
63 | padding: 20px;
64 | font-family: "proxima-nova", sans-serif;
65 | font-weight: 600;
66 | color: #fff;
67 | text-decoration: none;
68 | border-radius: 5px;
69 | text-align: center;
70 | font-size: 18px;
71 | -webkit-transition-property: background-color box-shadow;
72 | -webkit-transition-duration: 200ms;
73 | -webkit-transition-timing-function: ease-in-out;
74 | -moz-transition-property: background-color box-shadow;
75 | -moz-transition-duration: 200ms;
76 | -moz-transition-timing-function: ease-in-out;
77 | -ms-transition-property: background-color box-shadow;
78 | -ms-transition-duration: 200ms;
79 | -ms-transition-timing-function: ease-in-out;
80 | -o-transition-property: background-color box-shadow;
81 | -o-transition-duration: 200ms;
82 | -o-transition-timing-function: ease-in-out;
83 | transition-property: background-color box-shadow;
84 | transition-duration: 200ms;
85 | transition-timing-function: ease-in-out;
86 | }
87 | .btn:active {
88 | box-shadow: inset 1px 1px 4px rgba(0, 0, 0, 0.25);
89 | }
90 | .btn.red {
91 | background-color: #f33e6f;
92 | }
93 | .btn.red:hover {
94 | background-color: #f2265d;
95 | }
96 | .btn.blue {
97 | background-color: #2d91ea;
98 | }
99 | .btn.blue:hover {
100 | background-color: #1785e6;
101 | }
102 | header {
103 | width: 978px;
104 | margin: 20px auto;
105 | display: block;
106 | position: relative;
107 | }
108 | header hgroup {
109 | width: 50%;
110 | padding: 20px 0;
111 | }
112 | header #introChart {
113 | position: absolute;
114 | top: 60px;
115 | right: 0;
116 | }
117 | header .btn {
118 | margin-right: 10px;
119 | width: 180px;
120 | }
121 | footer {
122 | width: 100%;
123 | text-align: center;
124 | background-color: #ebebeb;
125 | }
126 | footer p {
127 | color: #767c8d;
128 | font-family: "proxima-nova", sans-serif;
129 | font-size: 16px;
130 | padding: 20px 0;
131 | }
132 | section {
133 | width: 978px;
134 | margin: 40px auto;
135 | }
136 | section:before {
137 | content: '';
138 | width: 600px;
139 | margin: 0 auto;
140 | border-top: 1px solid #ebebeb;
141 | height: 20px;
142 | display: block;
143 | }
144 | section:after {
145 | content: "";
146 | display: table;
147 | clear: both;
148 | }
149 | *section {
150 | zoom: 1;
151 | }
152 | #features article {
153 | width: 33.33%;
154 | float: left;
155 | }
156 | #features article p {
157 | display: block;
158 | width: 90%;
159 | margin: 0 auto;
160 | text-align: center;
161 | }
162 | #features article img {
163 | width: 250px;
164 | height: 250px;
165 | margin: 0 auto;
166 | display: block;
167 | }
168 | #examples article {
169 | -webkit-transition: opacity 200ms ease-in-out;
170 | -ms-transition: opacity 200ms ease-in-out;
171 | -moz-transition: opacity 200ms ease-in-out;
172 | -o-transition: opacity 200ms ease-in-out;
173 | transition: opacity 200ms ease-in-out;
174 | position: relative;
175 | margin-top: 20px;
176 | clear: both;
177 | }
178 | #examples article:after {
179 | content: '';
180 | width: 600px;
181 | padding-top: 40px;
182 | margin: 40px auto;
183 | border-bottom: 1px solid #ebebeb;
184 | height: 20px;
185 | display: block;
186 | clear: both;
187 | }
188 | #examples article p {
189 | margin-top: 10px;
190 | }
191 | #examples article .half {
192 | width: 50%;
193 | float: left;
194 | }
195 | #examples article .canvasWrapper {
196 | float: left;
197 | width: 449px;
198 | padding: 0 20px;
199 | }
200 | #examples h3 {
201 | clear: both;
202 | }
203 | #examples .hidden {
204 | opacity: 0;
205 | }
206 |
--------------------------------------------------------------------------------
/docs/styles.css:
--------------------------------------------------------------------------------
1 | /* Pretty printing styles. Used with prettify.js. */
2 | /* Vim sunburst theme by David Leibovic */
3 | pre .str {
4 | color: #65B042;
5 | }
6 | /* string - green */
7 | pre .kwd {
8 | color: #E28964;
9 | }
10 | /* keyword - dark pink */
11 | pre .com {
12 | color: #AEAEAE;
13 | font-style: italic;
14 | }
15 | /* comment - gray */
16 | pre .typ {
17 | color: #89bdff;
18 | }
19 | /* type - light blue */
20 | pre .lit {
21 | color: #3387CC;
22 | }
23 | /* literal - blue */
24 | pre .pun {
25 | color: #fff;
26 | }
27 | /* punctuation - white */
28 | pre .pln {
29 | color: #fff;
30 | }
31 | /* plaintext - white */
32 | pre .tag {
33 | color: #89bdff;
34 | }
35 | /* html/xml tag - light blue */
36 | pre .atn {
37 | color: #bdb76b;
38 | }
39 | /* html/xml attribute name - khaki */
40 | pre .atv {
41 | color: #65B042;
42 | }
43 | /* html/xml attribute value - green */
44 | pre .dec {
45 | color: #3387CC;
46 | }
47 | /* decimal - blue */
48 | /* Specify class=linenums on a pre to get line numbering */
49 | ol.linenums {
50 | margin-top: 0;
51 | margin-bottom: 0;
52 | color: #AEAEAE;
53 | }
54 | /* IE indents via margin-left */
55 | li.L0,
56 | li.L1,
57 | li.L2,
58 | li.L3,
59 | li.L5,
60 | li.L6,
61 | li.L7,
62 | li.L8 {
63 | list-style-type: none;
64 | }
65 | /* Alternate shading for lines */
66 | @media print {
67 | pre .str {
68 | color: #060;
69 | }
70 | pre .kwd {
71 | color: #006;
72 | font-weight: bold;
73 | }
74 | pre .com {
75 | color: #600;
76 | font-style: italic;
77 | }
78 | pre .typ {
79 | color: #404;
80 | font-weight: bold;
81 | }
82 | pre .lit {
83 | color: #044;
84 | }
85 | pre .pun {
86 | color: #440;
87 | }
88 | pre .pln {
89 | color: #000;
90 | }
91 | pre .tag {
92 | color: #006;
93 | font-weight: bold;
94 | }
95 | pre .atn {
96 | color: #404;
97 | }
98 | pre .atv {
99 | color: #060;
100 | }
101 | }
102 | * {
103 | padding: 0;
104 | margin: 0;
105 | box-sizing: border-box;
106 | -moz-box-sizing: border-box;
107 | -webkit-box-sizing: border-box;
108 | color: inherit;
109 | text-rendering: optimizeLegibility;
110 | }
111 | body {
112 | color: #282b36;
113 | min-width: 768px;
114 | }
115 | .redBorder,
116 | .greenBorder,
117 | .yellowBorder {
118 | border-top: 8px solid #282b36;
119 | width: 33.33%;
120 | float: left;
121 | height: 16px;
122 | position: relative;
123 | z-index: 50;
124 | }
125 | .redBorder {
126 | background-color: #f33e6f;
127 | }
128 | .greenBorder {
129 | background-color: #46bfbd;
130 | }
131 | .yellowBorder {
132 | background-color: #fdb45c;
133 | }
134 | h1 {
135 | font-family: "proxima-nova";
136 | font-weight: 600;
137 | font-size: 32px;
138 | }
139 | h2 {
140 | font-family: "proxima-nova";
141 | font-weight: 600;
142 | font-size: 22px;
143 | line-height: 40px;
144 | }
145 | #mainHeader {
146 | font-size: 55px;
147 | }
148 | #introText {
149 | font-weight: 400;
150 | margin-top: 20px;
151 | font-size: 26px;
152 | line-height: 40px;
153 | margin-bottom: 40px;
154 | }
155 | #wrapper {
156 | margin: 0 auto;
157 | position: relative;
158 | min-width: 768px;
159 | }
160 | #wrapper nav {
161 | width: 20%;
162 | padding-right: 20px;
163 | position: fixed;
164 | height: 100%;
165 | overflow-y: scroll;
166 | top: 0;
167 | z-index: 0;
168 | padding: 40px 20px;
169 | font-family: "proxima-nova";
170 | background-color: #ebebeb;
171 | }
172 | #wrapper nav dl {
173 | color: #767c8d;
174 | }
175 | #wrapper nav dl dt {
176 | list-style: none;
177 | margin-top: 10px;
178 | margin-bottom: 5px;
179 | }
180 | #wrapper nav dl dt a {
181 | display: block;
182 | padding: 2px 0;
183 | border-bottom: 1px solid rgba(118, 124, 141, 0.2);
184 | text-decoration: none;
185 | }
186 | #wrapper nav dl dd {
187 | margin-bottom: 5px;
188 | padding-left: 5px;
189 | }
190 | #wrapper nav dl dd:before {
191 | content: "- ";
192 | }
193 | #wrapper nav dl dd a {
194 | text-decoration: none;
195 | font-size: 12px;
196 | border-bottom: 1px solid transparent;
197 | }
198 | #wrapper nav dl a {
199 | -webkit-transition: all 200ms ease-in-out;
200 | -moz-transition: all 200ms ease-in-out;
201 | -o-transition: all 200ms ease-in-out;
202 | -ms-transition: all 200ms ease-in-out;
203 | transition: all 200ms ease-in-out;
204 | }
205 | #wrapper nav dl a:hover {
206 | color: #2d91ea;
207 | border-bottom-color: #2d91ea;
208 | }
209 | #wrapper #contentWrapper {
210 | width: 80%;
211 | max-width: 1080px;
212 | margin-left: 20%;
213 | padding: 0px 40px;
214 | padding-top: 72px;
215 | }
216 | article {
217 | border-top: 1px solid #ebebeb;
218 | padding: 40px 0;
219 | }
220 | article h2 {
221 | margin-top: 20px;
222 | }
223 | p,
224 | ul li {
225 | font-family: "proxima-nova";
226 | line-height: 20px;
227 | font-size: 16px;
228 | margin-top: 10px;
229 | color: #767c8d;
230 | }
231 | p a,
232 | ul li a {
233 | text-decoration: none;
234 | border-bottom: 1px solid #2d91ea;
235 | color: #2d91ea;
236 | }
237 | canvas {
238 | margin-top: 20px;
239 | }
240 | pre {
241 | background-color: #292b36;
242 | padding: 10px;
243 | border-radius: 5px;
244 | position: relative;
245 | -webkit-font-smoothing: antialiased;
246 | margin: 40px 0 20px 0;
247 | }
248 | pre code {
249 | display: block;
250 | }
251 | pre:before {
252 | content: attr(data-type);
253 | position: absolute;
254 | font-size: 12px;
255 | top: -30px;
256 | left: 0;
257 | font-family: "proxima-nova";
258 | font-weight: 400;
259 | display: inline-block;
260 | padding: 2px 5px;
261 | border-radius: 5px;
262 | background-color: #ebebeb;
263 | }
264 |
--------------------------------------------------------------------------------
/site/assets/effects.js:
--------------------------------------------------------------------------------
1 | $(window).load(function() {
2 | var lineChartData = {
3 | labels : ["January","February","March","April","May","June","July"],
4 | datasets : [
5 | {
6 | fillColor : "rgba(220,220,220,0.5)",
7 | strokeColor : "rgba(220,220,220,1)",
8 | pointColor : "rgba(220,220,220,1)",
9 | pointStrokeColor : "#fff",
10 | data : [65,59,90,81,56,55,40]
11 | },
12 | {
13 | fillColor : "rgba(151,187,205,0.5)",
14 | strokeColor : "rgba(151,187,205,1)",
15 | pointColor : "rgba(151,187,205,1)",
16 | pointStrokeColor : "#fff",
17 | data : [28,48,40,19,96,27,100]
18 | }
19 | ]
20 | };
21 |
22 | var barChartData = {
23 | labels : ["January","February","March","April","May","June","July"],
24 | datasets : [
25 | {
26 | fillColor : "rgba(220,220,220,0.5)",
27 | strokeColor : "rgba(220,220,220,1)",
28 | data : [65,59,90,81,56,55,40]
29 | },
30 | {
31 | fillColor : "rgba(151,187,205,0.5)",
32 | strokeColor : "rgba(151,187,205,1)",
33 | data : [28,48,40,19,96,27,100]
34 | }
35 | ]
36 |
37 | };
38 |
39 | var radarChartData = {
40 | labels : ["A","B","C","D","E","F","G"],
41 | datasets : [
42 | {
43 | fillColor : "rgba(220,220,220,0.5)",
44 | strokeColor : "rgba(220,220,220,1)",
45 | pointColor : "rgba(220,220,220,1)",
46 | pointStrokeColor : "#fff",
47 | data : [65,59,90,81,56,55,40]
48 | },
49 | {
50 | fillColor : "rgba(151,187,205,0.5)",
51 | strokeColor : "rgba(151,187,205,1)",
52 | pointColor : "rgba(151,187,205,1)",
53 | pointStrokeColor : "#fff",
54 | data : [28,48,40,19,96,27,100]
55 | }
56 | ]
57 |
58 | };
59 | var pieChartData = [
60 | {
61 | value: 30,
62 | color:"#F38630"
63 | },
64 | {
65 | value : 50,
66 | color : "#E0E4CC"
67 | },
68 | {
69 | value : 100,
70 | color : "#69D2E7"
71 | }
72 |
73 | ];
74 | var polarAreaChartData = [
75 | {
76 | value : 62,
77 | color: "#D97041"
78 | },
79 | {
80 | value : 70,
81 | color: "#C7604C"
82 | },
83 | {
84 | value : 41,
85 | color: "#21323D"
86 | },
87 | {
88 | value : 24,
89 | color: "#9D9B7F"
90 | },
91 | {
92 | value : 55,
93 | color: "#7D4F6D"
94 | },
95 | {
96 | value : 18,
97 | color: "#584A5E"
98 | }
99 | ];
100 | var doughnutChartData = [
101 | {
102 | value: 30,
103 | color:"#F7464A"
104 | },
105 | {
106 | value : 50,
107 | color : "#46BFBD"
108 | },
109 | {
110 | value : 100,
111 | color : "#FDB45C"
112 | },
113 | {
114 | value : 40,
115 | color : "#949FB1"
116 | },
117 | {
118 | value : 120,
119 | color : "#4D5360"
120 | }
121 |
122 | ];
123 |
124 | var globalGraphSettings = {animation : Modernizr.canvas};
125 |
126 | setIntroChart();
127 |
128 | function setIntroChart(){
129 | var ctx = document.getElementById("introChart").getContext("2d");
130 |
131 | new Chart(ctx).Line(lineChartData,{animation: Modernizr.canvas, scaleShowLabels : false, scaleFontColor : "#767C8D"});
132 | };
133 |
134 | function showLineChart(){
135 | var ctx = document.getElementById("lineChartCanvas").getContext("2d");
136 | new Chart(ctx).Line(lineChartData,globalGraphSettings);
137 | };
138 | function showBarChart(){
139 | var ctx = document.getElementById("barChartCanvas").getContext("2d");
140 | new Chart(ctx).Bar(barChartData,globalGraphSettings);
141 | };
142 | function showRadarChart(){
143 | var ctx = document.getElementById("radarChartCanvas").getContext("2d");
144 | new Chart(ctx).Radar(radarChartData,globalGraphSettings);
145 | }
146 | function showPolarAreaChart(){
147 | var ctx = document.getElementById("polarAreaChartCanvas").getContext("2d");
148 | new Chart(ctx).PolarArea(polarAreaChartData,globalGraphSettings);
149 | }
150 | function showPieChart(){
151 | var ctx = document.getElementById("pieChartCanvas").getContext("2d");
152 | new Chart(ctx).Pie(pieChartData,globalGraphSettings);
153 | };
154 | function showDoughnutChart(){
155 | var ctx = document.getElementById("doughnutChartCanvas").getContext("2d");
156 | new Chart(ctx).Doughnut(doughnutChartData,globalGraphSettings);
157 | };
158 |
159 | var graphInitDelay = 300;
160 |
161 | //Set up each of the inview events here.
162 | $("#lineChart").on("inview",function(){
163 | var $this = $(this);
164 | $this.removeClass("hidden").off("inview");
165 | setTimeout(showLineChart,graphInitDelay);
166 | });
167 | $("#barChart").on("inview",function(){
168 | var $this = $(this);
169 | $this.removeClass("hidden").off("inview");
170 | setTimeout(showBarChart,graphInitDelay);
171 | });
172 |
173 | $("#radarChart").on("inview",function(){
174 | var $this = $(this);
175 | $this.removeClass("hidden").off("inview");
176 | setTimeout(showRadarChart,graphInitDelay);
177 | });
178 | $("#pieChart").on("inview",function(){
179 | var $this = $(this);
180 | $this.removeClass("hidden").off("inview");
181 | setTimeout(showPieChart,graphInitDelay);
182 | });
183 | $("#polarAreaChart").on("inview",function(){
184 | var $this = $(this);
185 | $this.removeClass("hidden").off("inview");
186 | setTimeout(showPolarAreaChart,graphInitDelay);
187 | });
188 | $("#doughnutChart").on("inview",function(){
189 | var $this = $(this);
190 | $this.removeClass("hidden").off("inview");
191 | setTimeout(showDoughnutChart,graphInitDelay);
192 | });
193 |
194 | });
195 |
196 | /**
197 | * author Christopher Blum
198 | * - based on the idea of Remy Sharp, http://remysharp.com/2009/01/26/element-in-view-event-plugin/
199 | * - forked from http://github.com/zuk/jquery.inview/
200 | */
201 | (function ($) {
202 | var inviewObjects = {}, viewportSize, viewportOffset,
203 | d = document, w = window, documentElement = d.documentElement, expando = $.expando;
204 |
205 | $.event.special.inview = {
206 | add: function(data) {
207 | inviewObjects[data.guid + "-" + this[expando]] = { data: data, $element: $(this) };
208 | },
209 |
210 | remove: function(data) {
211 | try { delete inviewObjects[data.guid + "-" + this[expando]]; } catch(e) {}
212 | }
213 | };
214 |
215 | function getViewportSize() {
216 | var mode, domObject, size = { height: w.innerHeight, width: w.innerWidth };
217 |
218 | // if this is correct then return it. iPad has compat Mode, so will
219 | // go into check clientHeight/clientWidth (which has the wrong value).
220 | if (!size.height) {
221 | mode = d.compatMode;
222 | if (mode || !$.support.boxModel) { // IE, Gecko
223 | domObject = mode === 'CSS1Compat' ?
224 | documentElement : // Standards
225 | d.body; // Quirks
226 | size = {
227 | height: domObject.clientHeight,
228 | width: domObject.clientWidth
229 | };
230 | }
231 | }
232 |
233 | return size;
234 | }
235 |
236 | function getViewportOffset() {
237 | return {
238 | top: w.pageYOffset || documentElement.scrollTop || d.body.scrollTop,
239 | left: w.pageXOffset || documentElement.scrollLeft || d.body.scrollLeft
240 | };
241 | }
242 |
243 | function checkInView() {
244 | var $elements = $(), elementsLength, i = 0;
245 |
246 | $.each(inviewObjects, function(i, inviewObject) {
247 | var selector = inviewObject.data.selector,
248 | $element = inviewObject.$element;
249 | $elements = $elements.add(selector ? $element.find(selector) : $element);
250 | });
251 |
252 | elementsLength = $elements.length;
253 | if (elementsLength) {
254 | viewportSize = viewportSize || getViewportSize();
255 | viewportOffset = viewportOffset || getViewportOffset();
256 |
257 | for (; i viewportOffset.top &&
281 | elementOffset.top < viewportOffset.top + viewportSize.height &&
282 | elementOffset.left + elementSize.width > viewportOffset.left &&
283 | elementOffset.left < viewportOffset.left + viewportSize.width) {
284 | visiblePartX = (viewportOffset.left > elementOffset.left ?
285 | 'right' : (viewportOffset.left + viewportSize.width) < (elementOffset.left + elementSize.width) ?
286 | 'left' : 'both');
287 | visiblePartY = (viewportOffset.top > elementOffset.top ?
288 | 'bottom' : (viewportOffset.top + viewportSize.height) < (elementOffset.top + elementSize.height) ?
289 | 'top' : 'both');
290 | visiblePartsMerged = visiblePartX + "-" + visiblePartY;
291 | if (!inView || inView !== visiblePartsMerged) {
292 | $element.data('inview', visiblePartsMerged).trigger('inview', [true, visiblePartX, visiblePartY]);
293 | }
294 | } else if (inView) {
295 | $element.data('inview', false).trigger('inview', [false]);
296 | }
297 | }
298 | }
299 | }
300 |
301 | $(w).bind("scroll resize", function() {
302 | viewportSize = viewportOffset = null;
303 | });
304 |
305 | // IE < 9 scrolls to focused elements without firing the "scroll" event
306 | if (!documentElement.addEventListener && documentElement.attachEvent) {
307 | documentElement.attachEvent("onfocusin", function() {
308 | viewportOffset = null;
309 | });
310 | }
311 |
312 | // Use setInterval in order to also make sure this captures elements within
313 | // "overflow:scroll" elements or elements that appeared in the dom tree due to
314 | // dom manipulation and reflow
315 | // old: $(window).scroll(checkInView);
316 | //
317 | // By the way, iOS (iPad, iPhone, ...) seems to not execute, or at least delays
318 | // intervals while the user scrolls. Therefore the inview event might fire a bit late there
319 | setInterval(checkInView, 250);
320 | })(jQuery);
--------------------------------------------------------------------------------
/docs/prettify.js:
--------------------------------------------------------------------------------
1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
9 |
10 |
11 |
12 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | Chart.js
30 | Easy, object oriented client side graphs for designers and developers
31 |
32 |
33 |
34 |
35 | DocumentationDownload
36 |
37 |
38 |
39 |
40 | 6 Chart types
41 | Visualise your data in different ways. Each of them animated, fully customisable and look great, even on retina displays.
42 |
43 |
44 |
45 | HTML5 Based
46 | Chart.js uses the HTML5 canvas element. It supports all modern browsers, and polyfills provide support for IE7/8.
47 |
48 |
49 |
50 | Simple and flexible
51 | Chart.js is dependency free, lightweight (4.5k when minified and gzipped) and offers loads of customisation options.
52 |
53 |
54 |
55 |
56 |
57 |
Line charts
58 |
Line graphs are probably the most widely used graph for showing trends.
59 |
Chart.js has a ton of customisation features for line graphs, along with support for multiple datasets to be plotted on one chart.
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
Bar charts
72 |
Bar graphs are also great at showing trend data.
73 |
Chart.js supports bar charts with a load of custom styles and the ability to show multiple bars for each x value.
74 |
75 |
76 |
77 |
78 |
79 |
Radar charts
80 |
Radar charts are good for comparing a selection of different pieces of data.
81 |
Chart.js supports multiple data sets plotted on the same radar chart. It also supports all of the customisation and animation options you'd expect.
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
Pie charts
94 |
Pie charts are great at comparing proportions within a single data set.
95 |
Chart.js shows animated pie charts with customisable colours, strokes, animation easing and effects.
96 |
97 |
98 |
99 |
100 |
101 |
Polar area charts
102 |
Polar area charts are similar to pie charts, but the variable isn't the circumference of the segment, but the radius of it.
103 |
Chart.js delivers animated polar area charts with custom coloured segments, along with customisable scales and animation.
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
Doughnut charts
116 |
Similar to pie charts, doughnut charts are great for showing proportional data.
117 |
Chart.js offers the same customisation options as for pie charts, but with a custom sized inner cutout to turn your pies into doughnuts.
118 |
119 |
120 |
121 |
122 |
126 |
127 |
140 |
141 |