Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,5 @@
{
"name": "animate.css",
"version": "3.1.1",
"main": "./animate.css"
}
@@ -0,0 +1,15 @@
{
"name": "animate.css",
"version": "3.2.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-autoprefixer": "~0.4.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-cssmin": "~0.8.0",
"load-grunt-tasks": "~0.2.0"
},
"spm": {
"main": "./animate.css"
}
}
@@ -0,0 +1,20 @@
@charset "UTF-8";
/*!
Animate.css - http://daneden.me/animate
Licensed under the MIT license - http://opensource.org/licenses/MIT
Copyright (c) 2013 Daniel Eden
*/

.animated {
animation-duration: 1s;
animation-fill-mode: both;
}

.animated.infinite {
animation-iteration-count: infinite;
}

.animated.hinge {
animation-duration: 2s;
}
@@ -0,0 +1,25 @@
@keyframes bounce {
0%, 20%, 53%, 80%, 100% {
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transform: translate3d(0,0,0);
}

40%, 43% {
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transform: translate3d(0, -30px, 0);
}

70% {
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transform: translate3d(0, -15px, 0);
}

90% {
transform: translate3d(0,-4px,0);
}
}

.bounce {
animation-name: bounce;
transform-origin: center bottom;
}
@@ -0,0 +1,13 @@
@keyframes flash {
0%, 50%, 100% {
opacity: 1;
}

25%, 75% {
opacity: 0;
}
}

.flash {
animation-name: flash;
}
@@ -0,0 +1,19 @@
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */

@keyframes pulse {
0% {
transform: scale3d(1, 1, 1);
}

50% {
transform: scale3d(1.05, 1.05, 1.05);
}

100% {
transform: scale3d(1, 1, 1);
}
}

.pulse {
animation-name: pulse;
}
@@ -0,0 +1,33 @@
@keyframes rubberBand {
0% {
transform: scale3d(1, 1, 1);
}

30% {
transform: scale3d(1.25, 0.75, 1);
}

40% {
transform: scale3d(0.75, 1.25, 1);
}

50% {
transform: scale3d(1.15, 0.85, 1);
}

65% {
transform: scale3d(.95, 1.05, 1);
}

75% {
transform: scale3d(1.05, .95, 1);
}

100% {
transform: scale3d(1, 1, 1);
}
}

.rubberBand {
animation-name: rubberBand;
}
@@ -0,0 +1,17 @@
@keyframes shake {
0%, 100% {
transform: translate3d(0, 0, 0);
}

10%, 30%, 50%, 70%, 90% {
transform: translate3d(-10px, 0, 0);
}

20%, 40%, 60%, 80% {
transform: translate3d(10px, 0, 0);
}
}

.shake {
animation-name: shake;
}
@@ -0,0 +1,26 @@
@keyframes swing {
20% {
transform: rotate3d(0, 0, 1, 15deg);
}

40% {
transform: rotate3d(0, 0, 1, -10deg);
}

60% {
transform: rotate3d(0, 0, 1, 5deg);
}

80% {
transform: rotate3d(0, 0, 1, -5deg);
}

100% {
transform: rotate3d(0, 0, 1, 0deg);
}
}

.swing {
transform-origin: top center;
animation-name: swing;
}
@@ -0,0 +1,25 @@
@keyframes tada {
0% {
transform: scale3d(1, 1, 1);
}

10%, 20% {
transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
}

30%, 50%, 70%, 90% {
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
}

40%, 60%, 80% {
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
}

100% {
transform: scale3d(1, 1, 1);
}
}

.tada {
animation-name: tada;
}
@@ -0,0 +1,35 @@
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */

@keyframes wobble {
0% {
transform: none;
}

15% {
transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
}

30% {
transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
}

45% {
transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
}

60% {
transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
}

75% {
transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
}

100% {
transform: none;
}
}

.wobble {
animation-name: wobble;
}
@@ -0,0 +1,37 @@
@keyframes bounceIn {
0%, 20%, 40%, 60%, 80%, 100% {
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

0% {
opacity: 0;
transform: scale3d(.3, .3, .3);
}

20% {
transform: scale3d(1.1, 1.1, 1.1);
}

40% {
transform: scale3d(.9, .9, .9);
}

60% {
opacity: 1;
transform: scale3d(1.03, 1.03, 1.03);
}

80% {
transform: scale3d(.97, .97, .97);
}

100% {
opacity: 1;
transform: scale3d(1, 1, 1);
}
}

.bounceIn {
animation-name: bounceIn;
animation-duration: .75s;
}
@@ -0,0 +1,31 @@
@keyframes bounceInDown {
0%, 60%, 75%, 90%, 100% {
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

0% {
opacity: 0;
transform: translate3d(0, -3000px, 0);
}

60% {
opacity: 1;
transform: translate3d(0, 25px, 0);
}

75% {
transform: translate3d(0, -10px, 0);
}

90% {
transform: translate3d(0, 5px, 0);
}

100% {
transform: none;
}
}

.bounceInDown {
animation-name: bounceInDown;
}
@@ -0,0 +1,31 @@
@keyframes bounceInLeft {
0%, 60%, 75%, 90%, 100% {
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

0% {
opacity: 0;
transform: translate3d(-3000px, 0, 0);
}

60% {
opacity: 1;
transform: translate3d(25px, 0, 0);
}

75% {
transform: translate3d(-10px, 0, 0);
}

90% {
transform: translate3d(5px, 0, 0);
}

100% {
transform: none;
}
}

.bounceInLeft {
animation-name: bounceInLeft;
}
@@ -0,0 +1,31 @@
@keyframes bounceInRight {
0%, 60%, 75%, 90%, 100% {
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

0% {
opacity: 0;
transform: translate3d(3000px, 0, 0);
}

60% {
opacity: 1;
transform: translate3d(-25px, 0, 0);
}

75% {
transform: translate3d(10px, 0, 0);
}

90% {
transform: translate3d(-5px, 0, 0);
}

100% {
transform: none;
}
}

.bounceInRight {
animation-name: bounceInRight;
}
@@ -0,0 +1,31 @@
@keyframes bounceInUp {
0%, 60%, 75%, 90%, 100% {
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

0% {
opacity: 0;
transform: translate3d(0, 3000px, 0);
}

60% {
opacity: 1;
transform: translate3d(0, -20px, 0);
}

75% {
transform: translate3d(0, 10px, 0);
}

90% {
transform: translate3d(0, -5px, 0);
}

100% {
transform: translate3d(0, 0, 0);
}
}

.bounceInUp {
animation-name: bounceInUp;
}
@@ -0,0 +1,20 @@
@keyframes bounceOut {
20% {
transform: scale3d(.9, .9, .9);
}

50%, 55% {
opacity: 1;
transform: scale3d(1.1, 1.1, 1.1);
}

100% {
opacity: 0;
transform: scale3d(.3, .3, .3);
}
}

.bounceOut {
animation-name: bounceOut;
animation-duration: .75s;
}
@@ -0,0 +1,19 @@
@keyframes bounceOutDown {
20% {
transform: translate3d(0, 10px, 0);
}

40%, 45% {
opacity: 1;
transform: translate3d(0, -20px, 0);
}

100% {
opacity: 0;
transform: translate3d(0, 2000px, 0);
}
}

.bounceOutDown {
animation-name: bounceOutDown;
}
@@ -0,0 +1,15 @@
@keyframes bounceOutLeft {
20% {
opacity: 1;
transform: translate3d(20px, 0, 0);
}

100% {
opacity: 0;
transform: translate3d(-2000px, 0, 0);
}
}

.bounceOutLeft {
animation-name: bounceOutLeft;
}
@@ -0,0 +1,15 @@
@keyframes bounceOutRight {
20% {
opacity: 1;
transform: translate3d(-20px, 0, 0);
}

100% {
opacity: 0;
transform: translate3d(2000px, 0, 0);
}
}

.bounceOutRight {
animation-name: bounceOutRight;
}
@@ -0,0 +1,19 @@
@keyframes bounceOutUp {
20% {
transform: translate3d(0, -10px, 0);
}

40%, 45% {
opacity: 1;
transform: translate3d(0, 20px, 0);
}

100% {
opacity: 0;
transform: translate3d(0, -2000px, 0);
}
}

.bounceOutUp {
animation-name: bounceOutUp;
}
@@ -0,0 +1,8 @@
@keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}

.fadeIn {
animation-name: fadeIn;
}
@@ -0,0 +1,15 @@
@keyframes fadeInDown {
0% {
opacity: 0;
transform: translate3d(0, -100%, 0);
}

100% {
opacity: 1;
transform: none;
}
}

.fadeInDown {
animation-name: fadeInDown;
}
@@ -0,0 +1,15 @@
@keyframes fadeInDownBig {
0% {
opacity: 0;
transform: translate3d(0, -2000px, 0);
}

100% {
opacity: 1;
transform: none;
}
}

.fadeInDownBig {
animation-name: fadeInDownBig;
}
@@ -0,0 +1,15 @@
@keyframes fadeInLeft {
0% {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}

100% {
opacity: 1;
transform: none;
}
}

.fadeInLeft {
animation-name: fadeInLeft;
}
@@ -0,0 +1,15 @@
@keyframes fadeInLeftBig {
0% {
opacity: 0;
transform: translate3d(-2000px, 0, 0);
}

100% {
opacity: 1;
transform: none;
}
}

.fadeInLeftBig {
animation-name: fadeInLeftBig;
}
@@ -0,0 +1,15 @@
@keyframes fadeInRight {
0% {
opacity: 0;
transform: translate3d(100%, 0, 0);
}

100% {
opacity: 1;
transform: none;
}
}

.fadeInRight {
animation-name: fadeInRight;
}
@@ -0,0 +1,15 @@
@keyframes fadeInRightBig {
0% {
opacity: 0;
transform: translate3d(2000px, 0, 0);
}

100% {
opacity: 1;
transform: none;
}
}

.fadeInRightBig {
animation-name: fadeInRightBig;
}
@@ -0,0 +1,15 @@
@keyframes fadeInUp {
0% {
opacity: 0;
transform: translate3d(0, 100%, 0);
}

100% {
opacity: 1;
transform: none;
}
}

.fadeInUp {
animation-name: fadeInUp;
}
@@ -0,0 +1,15 @@
@keyframes fadeInUpBig {
0% {
opacity: 0;
transform: translate3d(0, 2000px, 0);
}

100% {
opacity: 1;
transform: none;
}
}

.fadeInUpBig {
animation-name: fadeInUpBig;
}
@@ -0,0 +1,8 @@
@keyframes fadeOut {
0% {opacity: 1;}
100% {opacity: 0;}
}

.fadeOut {
animation-name: fadeOut;
}
@@ -0,0 +1,14 @@
@keyframes fadeOutDown {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(0, 100%, 0);
}
}

.fadeOutDown {
animation-name: fadeOutDown;
}
@@ -0,0 +1,14 @@
@keyframes fadeOutDownBig {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(0, 2000px, 0);
}
}

.fadeOutDownBig {
animation-name: fadeOutDownBig;
}
@@ -0,0 +1,14 @@
@keyframes fadeOutLeft {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}
}

.fadeOutLeft {
animation-name: fadeOutLeft;
}
@@ -0,0 +1,14 @@
@keyframes fadeOutLeftBig {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(-2000px, 0, 0);
}
}

.fadeOutLeftBig {
animation-name: fadeOutLeftBig;
}
@@ -0,0 +1,14 @@
@keyframes fadeOutRight {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(100%, 0, 0);
}
}

.fadeOutRight {
animation-name: fadeOutRight;
}
@@ -0,0 +1,14 @@
@keyframes fadeOutRightBig {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(2000px, 0, 0);
}
}

.fadeOutRightBig {
animation-name: fadeOutRightBig;
}
@@ -0,0 +1,14 @@
@keyframes fadeOutUp {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(0, -100%, 0);
}
}

.fadeOutUp {
animation-name: fadeOutUp;
}
@@ -0,0 +1,14 @@
@keyframes fadeOutUpBig {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(0, -2000px, 0);
}
}

.fadeOutUpBig {
animation-name: fadeOutUpBig;
}
@@ -0,0 +1,31 @@
@keyframes flip {
0% {
transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
animation-timing-function: ease-out;
}

40% {
transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
animation-timing-function: ease-out;
}

50% {
transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
animation-timing-function: ease-in;
}

80% {
transform: perspective(400px) scale3d(.95, .95, .95);
animation-timing-function: ease-in;
}

100% {
transform: perspective(400px);
animation-timing-function: ease-in;
}
}

.animated.flip {
backface-visibility: visible;
animation-name: flip;
}
@@ -0,0 +1,30 @@
@keyframes flipInX {
0% {
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transition-timing-function: ease-in;
opacity: 0;
}

40% {
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transition-timing-function: ease-in;
}

60% {
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}

80% {
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}

100% {
transform: perspective(400px);
}
}

.flipInX {
backface-visibility: visible !important;
animation-name: flipInX;
}
@@ -0,0 +1,30 @@
@keyframes flipInY {
0% {
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transition-timing-function: ease-in;
opacity: 0;
}

40% {
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transition-timing-function: ease-in;
}

60% {
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}

80% {
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}

100% {
transform: perspective(400px);
}
}

.flipInY {
backface-visibility: visible !important;
animation-name: flipInY;
}
@@ -0,0 +1,21 @@
@keyframes flipOutX {
0% {
transform: perspective(400px);
}

30% {
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
opacity: 1;
}

100% {
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
opacity: 0;
}
}

.flipOutX {
animation-name: flipOutX;
animation-duration: .75s;
backface-visibility: visible !important;
}
@@ -0,0 +1,21 @@
@keyframes flipOutY {
0% {
transform: perspective(400px);
}

30% {
transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
opacity: 1;
}

100% {
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
opacity: 0;
}
}

.flipOutY {
backface-visibility: visible !important;
animation-name: flipOutY;
animation-duration: .75s;
}
@@ -0,0 +1,26 @@
@keyframes lightSpeedIn {
0% {
transform: translate3d(100%, 0, 0) skewX(-30deg);
opacity: 0;
}

60% {
transform: skewX(20deg);
opacity: 1;
}

80% {
transform: skewX(-5deg);
opacity: 1;
}

100% {
transform: none;
opacity: 1;
}
}

.lightSpeedIn {
animation-name: lightSpeedIn;
animation-timing-function: ease-out;
}
@@ -0,0 +1,15 @@
@keyframes lightSpeedOut {
0% {
opacity: 1;
}

100% {
transform: translate3d(100%, 0, 0) skewX(30deg);
opacity: 0;
}
}

.lightSpeedOut {
animation-name: lightSpeedOut;
animation-timing-function: ease-in;
}
@@ -0,0 +1,17 @@
@keyframes rotateIn {
0% {
transform-origin: center;
transform: rotate3d(0, 0, 1, -200deg);
opacity: 0;
}

100% {
transform-origin: center;
transform: none;
opacity: 1;
}
}

.rotateIn {
animation-name: rotateIn;
}
@@ -0,0 +1,17 @@
@keyframes rotateInDownLeft {
0% {
transform-origin: left bottom;
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}

100% {
transform-origin: left bottom;
transform: none;
opacity: 1;
}
}

.rotateInDownLeft {
animation-name: rotateInDownLeft;
}
@@ -0,0 +1,17 @@
@keyframes rotateInDownRight {
0% {
transform-origin: right bottom;
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}

100% {
transform-origin: right bottom;
transform: none;
opacity: 1;
}
}

.rotateInDownRight {
animation-name: rotateInDownRight;
}
@@ -0,0 +1,17 @@
@keyframes rotateInUpLeft {
0% {
transform-origin: left bottom;
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}

100% {
transform-origin: left bottom;
transform: none;
opacity: 1;
}
}

.rotateInUpLeft {
animation-name: rotateInUpLeft;
}
@@ -0,0 +1,17 @@
@keyframes rotateInUpRight {
0% {
transform-origin: right bottom;
transform: rotate3d(0, 0, 1, -90deg);
opacity: 0;
}

100% {
transform-origin: right bottom;
transform: none;
opacity: 1;
}
}

.rotateInUpRight {
animation-name: rotateInUpRight;
}
@@ -0,0 +1,16 @@
@keyframes rotateOut {
0% {
transform-origin: center;
opacity: 1;
}

100% {
transform-origin: center;
transform: rotate3d(0, 0, 1, 200deg);
opacity: 0;
}
}

.rotateOut {
animation-name: rotateOut;
}
@@ -0,0 +1,16 @@
@keyframes rotateOutDownLeft {
0% {
transform-origin: left bottom;
opacity: 1;
}

100% {
transform-origin: left bottom;
transform: rotate(0, 0, 1, 45deg);
opacity: 0;
}
}

.rotateOutDownLeft {
animation-name: rotateOutDownLeft;
}
@@ -0,0 +1,16 @@
@keyframes rotateOutDownRight {
0% {
transform-origin: right bottom;
opacity: 1;
}

100% {
transform-origin: right bottom;
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}

.rotateOutDownRight {
animation-name: rotateOutDownRight;
}
@@ -0,0 +1,16 @@
@keyframes rotateOutUpLeft {
0% {
transform-origin: left bottom;
opacity: 1;
}

100% {
transform-origin: left bottom;
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}

.rotateOutUpLeft {
animation-name: rotateOutUpLeft;
}
@@ -0,0 +1,16 @@
@keyframes rotateOutUpRight {
0% {
transform-origin: right bottom;
opacity: 1;
}

100% {
transform-origin: right bottom;
transform: rotate3d(0, 0, 1, 90deg);
opacity: 0;
}
}

.rotateOutUpRight {
animation-name: rotateOutUpRight;
}
@@ -0,0 +1,28 @@
@keyframes hinge {
0% {
transform-origin: top left;
animation-timing-function: ease-in-out;
}

20%, 60% {
transform: rotate3d(0, 0, 1, 80deg);
transform-origin: top left;
animation-timing-function: ease-in-out;
}

40%, 80% {
transform: rotate3d(0, 0, 1, 60deg);
transform-origin: top left;
animation-timing-function: ease-in-out;
opacity: 1;
}

100% {
transform: translate3d(0, 700px, 0);
opacity: 0;
}
}

.hinge {
animation-name: hinge;
}
@@ -0,0 +1,17 @@
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */

@keyframes rollIn {
0% {
opacity: 0;
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
}

100% {
opacity: 1;
transform: none;
}
}

.rollIn {
animation-name: rollIn;
}
@@ -0,0 +1,16 @@
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */

@keyframes rollOut {
0% {
opacity: 1;
}

100% {
opacity: 0;
transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
}
}

.rollOut {
animation-name: rollOut;
}
@@ -0,0 +1,14 @@
@keyframes zoomIn {
0% {
opacity: 0;
transform: scale3d(.3, .3, .3);
}

50% {
opacity: 1;
}
}

.zoomIn {
animation-name: zoomIn;
}
@@ -0,0 +1,17 @@
@keyframes zoomInDown {
0% {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}

60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
}
}

.zoomInDown {
animation-name: zoomInDown;
}
@@ -0,0 +1,17 @@
@keyframes zoomInLeft {
0% {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}

60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
}
}

.zoomInLeft {
animation-name: zoomInLeft;
}
@@ -0,0 +1,17 @@
@keyframes zoomInRight {
0% {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}

60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
}
}

.zoomInRight {
animation-name: zoomInRight;
}
@@ -0,0 +1,17 @@
@keyframes zoomInUp {
0% {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}

60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
}
}

.zoomInUp {
animation-name: zoomInUp;
}
@@ -0,0 +1,18 @@
@keyframes zoomOut {
0% {
opacity: 1;
}

50% {
opacity: 0;
transform: scale3d(.3, .3, .3);
}

100% {
opacity: 0;
}
}

.zoomOut {
animation-name: zoomOut;
}
@@ -0,0 +1,18 @@
@keyframes zoomOutDown {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}

100% {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
transform-origin: center bottom;
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
}
}

.zoomOutDown {
animation-name: zoomOutDown;
}
@@ -0,0 +1,16 @@
@keyframes zoomOutLeft {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
}

100% {
opacity: 0;
transform: scale(.1) translate3d(-2000px, 0, 0);
transform-origin: left center;
}
}

.zoomOutLeft {
animation-name: zoomOutLeft;
}
@@ -0,0 +1,16 @@
@keyframes zoomOutRight {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
}

100% {
opacity: 0;
transform: scale(.1) translate3d(2000px, 0, 0);
transform-origin: right center;
}
}

.zoomOutRight {
animation-name: zoomOutRight;
}
@@ -0,0 +1,18 @@
@keyframes zoomOutUp {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}

100% {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
transform-origin: center bottom;
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
}
}

.zoomOutUp {
animation-name: zoomOutUp;
}
@@ -0,0 +1,21 @@
{
"name": "Chart.js",
"version": "1.0.1",
"description": "Simple HTML5 Charts using the canvas element",
"homepage": "https://github.com/nnnick/Chart.js",
"author": "nnnick",
"main": [
"Chart.min.js"
],
"dependencies": {},
"_release": "1.0.1",
"_resolution": {
"type": "version",
"tag": "v1.0.1",
"commit": "02f858b264de6c6c1af0579b05b7b5913d0d61ef"
},
"_source": "git://github.com/nnnick/Chart.js.git",
"_target": "~1.0.1",
"_originalSource": "chartjs",
"_direct": true
}
@@ -0,0 +1,7 @@

.DS_Store

node_modules/*
custom/*

docs/index.md
@@ -0,0 +1,10 @@
language: node_js
node_js:
- "0.11"
- "0.10"

before_script:
- npm install

script:
- gulp test
@@ -0,0 +1,51 @@
Contributing to Chart.js
========================

Contributions to Chart.js are welcome and encouraged, but please have a look through the guidelines in this document before raising an issue, or writing code for the project.


Using issues
------------

The [issue tracker](https://github.com/nnnick/Chart.js/issues) is the preferred channel for reporting bugs, requesting new features and submitting pull requests.

If you're suggesting a new chart type, please take a look at [writing new chart types](https://github.com/nnnick/Chart.js/blob/master/docs/06-Advanced.md#writing-new-chart-types) in the documentation, and some of the [community extensions](https://github.com/nnnick/Chart.js/blob/master/docs/06-Advanced.md#community-extensions) that have been created already.

To keep the library lightweight for everyone, it's unlikely we'll add many more chart types to the core of Chart.js, but issues are a good medium to design and spec out how new chart types could work and look.

Please do not use issues for support requests. For help using Chart.js, please take a look at the [`chartjs`](http://stackoverflow.com/questions/tagged/chartjs) tag on Stack Overflow.


Reporting bugs
--------------

Well structured, detailed bug reports are hugely valuable for the project.

Guidlines for reporting bugs:

- Check the issue search to see if it has already been reported
- Isolate the problem to a simple test case
- Provide a demonstration of the problem on [jsbin](http://jsbin.com) or similar

Please provide any additional details associated with the bug, if it's browser of screen density specific, or only happens with a certain configuration or data.


Pull requests
-------------

Clear, concise pull requests are excellent at continuing the projects community driven growth. But please review the guidelines below before starting work on the project.

Guidlines:

- Please ask before starting significant work on a pull request to check it's a change within the project scope, and isn't a duplicate effort
- Please make changes to the files in [`/src`](https://github.com/nnnick/Chart.js/tree/master/src), not `Chart.js` or `Chart.min.js` in the repo root directory
- Tabs for indentation, not spaces please.
- If adding new functionality, please also update the relevant `.md` file in [`/docs`](https://github.com/nnnick/Chart.js/tree/master/docs)
- Please make your commits in logical sections with clear commit messages
- Please avoid committing in the build Chart.js & Chart.min.js file, as it may cause conflicts when merging back


License
-------

By contributing your code, you agree to license your contribution under the [MIT license](https://github.com/nnnick/Chart.js/blob/master/LICENSE.md).

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,7 @@
Copyright (c) 2013-2015 Nick Downie

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.
@@ -0,0 +1,20 @@
# Chart.js

[![Build Status](https://travis-ci.org/nnnick/Chart.js.svg?branch=master)](https://travis-ci.org/nnnick/Chart.js) [![Code Climate](https://codeclimate.com/github/nnnick/Chart.js/badges/gpa.svg)](https://codeclimate.com/github/nnnick/Chart.js)


*Simple HTML5 Charts using the canvas element* [chartjs.org](http://www.chartjs.org)

## Documentation

You can find documentation at [chartjs.org/docs](http://www.chartjs.org/docs/). The markdown files that build the site are available under `/docs`. Please note - in some of the json examples of configuration you might notice some liquid tags - this is just for the generating the site html, please disregard.

## Bugs, issues and contributing

Before submitting an issue or a pull request to the project, please take a moment to look over the [contributing guidelines](https://github.com/nnnick/Chart.js/blob/master/CONTRIBUTING.md) first.

For support using Chart.js, please post questions with the [`chartjs` tag on Stack Overflow](http://stackoverflow.com/questions/tagged/chartjs).

## License

Chart.js is available under the [MIT license](http://opensource.org/licenses/MIT).
@@ -0,0 +1,11 @@
{
"name": "Chart.js",
"version": "1.0.1",
"description": "Simple HTML5 Charts using the canvas element",
"homepage": "https://github.com/nnnick/Chart.js",
"author": "nnnick",
"main": [
"Chart.min.js"
],
"dependencies": {}
}
@@ -0,0 +1,203 @@
---
title: Getting started
anchor: getting-started
---

###Include Chart.js

First we need to include the Chart.js library on the page. The library occupies a global variable of `Chart`.

```html
<script src="Chart.js"></script>
```

Alternatively, if you're using an AMD loader for JavaScript modules, that is also supported in the Chart.js core. Please note: the library will still occupy a global variable of `Chart`, even if it detects `define` and `define.amd`. If this is a problem, you can call `noConflict` to restore the global Chart variable to it's previous owner.

```javascript
// Using requirejs
require(['path/to/Chartjs'], function(Chart){
// Use Chart.js as normal here.

// Chart.noConflict restores the Chart global variable to it's previous owner
// The function returns what was previously Chart, allowing you to reassign.
var Chartjs = Chart.noConflict();

});
```

You can also grab Chart.js using bower:

```bash
bower install chartjs --save
```

###Creating a chart

To create a chart, we need to instantiate the `Chart` class. To do this, we need to pass in the 2d context of where we want to draw the chart. Here's an example.

```html
<canvas id="myChart" width="400" height="400"></canvas>
```

```javascript
// Get the context of the canvas element we want to select
var ctx = document.getElementById("myChart").getContext("2d");
var myNewChart = new Chart(ctx).PolarArea(data);
```

We can also get the context of our canvas with jQuery. To do this, we need to get the DOM node out of the jQuery collection, and call the `getContext("2d")` method on that.

```javascript
// Get context with jQuery - using jQuery's .get() method.
var ctx = $("#myChart").get(0).getContext("2d");
// This will get the first returned node in the jQuery collection.
var myNewChart = new Chart(ctx);
```

After we've instantiated the Chart class on the canvas we want to draw on, Chart.js will handle the scaling for retina displays.

With the Chart class set up, we can go on to create one of the charts Chart.js has available. In the example below, we would be drawing a Polar area chart.

```javascript
new Chart(ctx).PolarArea(data, options);
```

We call a method of the name of the chart we want to create. We pass in the data for that chart type, and the options for that chart as parameters. Chart.js will merge the global defaults with chart type specific defaults, then merge any options passed in as a second argument after data.

###Global chart configuration

This concept was introduced in Chart.js 1.0 to keep configuration DRY, and allow for changing options globally across chart types, avoiding the need to specify options for each instance, or the default for a particular chart type.

```javascript
Chart.defaults.global = {
// Boolean - Whether to animate the chart
animation: true,

// Number - Number of animation steps
animationSteps: 60,

// String - Animation easing effect
animationEasing: "easeOutQuart",

// Boolean - If we should show the scale at all
showScale: true,

// Boolean - If we want to override with a hard coded scale
scaleOverride: false,

// ** Required if scaleOverride is true **
// Number - The number of steps in a hard coded scale
scaleSteps: null,
// Number - The value jump in the hard coded scale
scaleStepWidth: null,
// Number - The scale starting value
scaleStartValue: null,

// String - Colour of the scale line
scaleLineColor: "rgba(0,0,0,.1)",

// Number - Pixel width of the scale line
scaleLineWidth: 1,

// Boolean - Whether to show labels on the scale
scaleShowLabels: true,

// Interpolated JS string - can access value
scaleLabel: "<%=value%>",

// Boolean - Whether the scale should stick to integers, not floats even if drawing space is there
scaleIntegersOnly: true,

// Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
scaleBeginAtZero: false,

// String - Scale label font declaration for the scale label
scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",

// Number - Scale label font size in pixels
scaleFontSize: 12,

// String - Scale label font weight style
scaleFontStyle: "normal",

// String - Scale label font colour
scaleFontColor: "#666",

// Boolean - whether or not the chart should be responsive and resize when the browser does.
responsive: false,

// Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
maintainAspectRatio: true,

// Boolean - Determines whether to draw tooltips on the canvas or not
showTooltips: true,

// Function - Determines whether to execute the customTooltips function instead of drawing the built in tooltips (See [Advanced - External Tooltips](#advanced-usage-custom-tooltips))
customTooltips: false,

// Array - Array of string names to attach tooltip events
tooltipEvents: ["mousemove", "touchstart", "touchmove"],

// String - Tooltip background colour
tooltipFillColor: "rgba(0,0,0,0.8)",

// String - Tooltip label font declaration for the scale label
tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",

// Number - Tooltip label font size in pixels
tooltipFontSize: 14,

// String - Tooltip font weight style
tooltipFontStyle: "normal",

// String - Tooltip label font colour
tooltipFontColor: "#fff",

// String - Tooltip title font declaration for the scale label
tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",

// Number - Tooltip title font size in pixels
tooltipTitleFontSize: 14,

// String - Tooltip title font weight style
tooltipTitleFontStyle: "bold",

// String - Tooltip title font colour
tooltipTitleFontColor: "#fff",

// Number - pixel width of padding around tooltip text
tooltipYPadding: 6,

// Number - pixel width of padding around tooltip text
tooltipXPadding: 6,

// Number - Size of the caret on the tooltip
tooltipCaretSize: 8,

// Number - Pixel radius of the tooltip border
tooltipCornerRadius: 6,

// Number - Pixel offset from point x to tooltip edge
tooltipXOffset: 10,
{% raw %}
// String - Template string for single tooltips
tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
{% endraw %}
// String - Template string for single tooltips
multiTooltipTemplate: "<%= value %>",

// Function - Will fire on animation progression.
onAnimationProgress: function(){},

// Function - Will fire on animation completion.
onAnimationComplete: function(){}
}
```

If for example, you wanted all charts created to be responsive, and resize when the browser window does, the following setting can be changed:

```javascript
Chart.defaults.global.responsive = true;
```

Now, every time we create a chart, `options.responsive` will be `true`.
@@ -0,0 +1,166 @@
---
title: Line Chart
anchor: line-chart
---
###Introduction
A line chart is a way of plotting data points on a line.

Often, it is used to show trend data, and the comparison of two data sets.

<div class="canvas-holder">
<canvas width="250" height="125"></canvas>
</div>

###Example usage
```javascript
var myLineChart = new Chart(ctx).Line(data, options);
```
###Data structure

```javascript
var data = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "My First dataset",
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointColor: "rgba(220,220,220,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: [65, 59, 80, 81, 56, 55, 40]
},
{
label: "My Second dataset",
fillColor: "rgba(151,187,205,0.2)",
strokeColor: "rgba(151,187,205,1)",
pointColor: "rgba(151,187,205,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(151,187,205,1)",
data: [28, 48, 40, 19, 86, 27, 90]
}
]
};
```

The line chart requires an array of labels for each of the data points. This is shown on the X axis.
The data for line charts is broken up into an array of datasets. Each dataset has a colour for the fill, a colour for the line and colours for the points and strokes of the points. These colours are strings just like CSS. You can use RGBA, RGB, HEX or HSL notation.

The label key on each dataset is optional, and can be used when generating a scale for the chart.

### Chart options

These are the customisation options specific to Line charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.

```javascript
{

///Boolean - Whether grid lines are shown across the chart
scaleShowGridLines : true,

//String - Colour of the grid lines
scaleGridLineColor : "rgba(0,0,0,.05)",

//Number - Width of the grid lines
scaleGridLineWidth : 1,

//Boolean - Whether to show horizontal lines (except X axis)
scaleShowHorizontalLines: true,

//Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: true,

//Boolean - Whether the line is curved between points
bezierCurve : true,

//Number - Tension of the bezier curve between points
bezierCurveTension : 0.4,

//Boolean - Whether to show a dot for each point
pointDot : true,

//Number - Radius of each point dot in pixels
pointDotRadius : 4,

//Number - Pixel width of point dot stroke
pointDotStrokeWidth : 1,

//Number - amount extra to add to the radius to cater for hit detection outside the drawn point
pointHitDetectionRadius : 20,

//Boolean - Whether to show a stroke for datasets
datasetStroke : true,

//Number - Pixel width of dataset stroke
datasetStrokeWidth : 2,

//Boolean - Whether to fill the dataset with a colour
datasetFill : true,
{% raw %}
//String - A legend template
legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].lineColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
{% endraw %}
};
```

You can override these for your `Chart` instance by passing a second argument into the `Line` method as an object with the keys you want to override.

For example, we could have a line chart without bezier curves between points by doing the following:

```javascript
new Chart(ctx).Line(data, {
bezierCurve: false
});
// This will create a chart with all of the default options, merged from the global config,
// and the Line chart defaults, but this particular instance will have `bezierCurve` set to false.
```

We can also change these defaults values for each Line type that is created, this object is available at `Chart.defaults.Line`.


### Prototype methods

#### .getPointsAtEvent( event )

Calling `getPointsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the point elements that are at that the same position of that event.

```javascript
canvas.onclick = function(evt){
var activePoints = myLineChart.getPointsAtEvent(evt);
// => activePoints is an array of points on the canvas that are at the same position as the click event.
};
```

This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.

#### .update( )

Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.

```javascript
myLineChart.datasets[0].points[2].value = 50;
// Would update the first dataset's value of 'March' to be 50
myLineChart.update();
// Calling update now animates the position of March from 90 to 50.
```

#### .addData( valuesArray, label )

Calling `addData(valuesArray, label)` on your Chart instance passing an array of values for each dataset, along with a label for those points.

```javascript
// The values array passed into addData should be one for each dataset in the chart
myLineChart.addData([40, 60], "August");
// This new data will now animate at the end of the chart.
```

#### .removeData( )

Calling `removeData()` on your Chart instance will remove the first value for all datasets on the chart.

```javascript
myLineChart.removeData();
// The chart will remove the first point and animate other points into place
```
@@ -0,0 +1,149 @@
---
title: Bar Chart
anchor: bar-chart
---

### Introduction
A bar chart is a way of showing data as bars.

It is sometimes used to show trend data, and the comparison of multiple data sets side by side.

<div class="canvas-holder">
<canvas width="250" height="125"></canvas>
</div>

### Example usage
```javascript
var myBarChart = new Chart(ctx).Bar(data, options);
```

### Data structure

```javascript
var data = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "My First dataset",
fillColor: "rgba(220,220,220,0.5)",
strokeColor: "rgba(220,220,220,0.8)",
highlightFill: "rgba(220,220,220,0.75)",
highlightStroke: "rgba(220,220,220,1)",
data: [65, 59, 80, 81, 56, 55, 40]
},
{
label: "My Second dataset",
fillColor: "rgba(151,187,205,0.5)",
strokeColor: "rgba(151,187,205,0.8)",
highlightFill: "rgba(151,187,205,0.75)",
highlightStroke: "rgba(151,187,205,1)",
data: [28, 48, 40, 19, 86, 27, 90]
}
]
};
```
The bar chart has the a very similar data structure to the line chart, and has an array of datasets, each with colours and an array of data. Again, colours are in CSS format.
We have an array of labels too for display. In the example, we are showing the same data as the previous line chart example.

The label key on each dataset is optional, and can be used when generating a scale for the chart.

### Chart Options

These are the customisation options specific to Bar charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.

```javascript
{
//Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
scaleBeginAtZero : true,

//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines : true,

//String - Colour of the grid lines
scaleGridLineColor : "rgba(0,0,0,.05)",

//Number - Width of the grid lines
scaleGridLineWidth : 1,

//Boolean - Whether to show horizontal lines (except X axis)
scaleShowHorizontalLines: true,

//Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: true,

//Boolean - If there is a stroke on each bar
barShowStroke : true,

//Number - Pixel width of the bar stroke
barStrokeWidth : 2,

//Number - Spacing between each of the X value sets
barValueSpacing : 5,

//Number - Spacing between data sets within X values
barDatasetSpacing : 1,
{% raw %}
//String - A legend template
legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].lineColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
{% endraw %}
}
```

You can override these for your `Chart` instance by passing a second argument into the `Bar` method as an object with the keys you want to override.

For example, we could have a bar chart without a stroke on each bar by doing the following:

```javascript
new Chart(ctx).Bar(data, {
barShowStroke: false
});
// This will create a chart with all of the default options, merged from the global config,
// and the Bar chart defaults but this particular instance will have `barShowStroke` set to false.
```

We can also change these defaults values for each Bar type that is created, this object is available at `Chart.defaults.Bar`.

### Prototype methods

#### .getBarsAtEvent( event )

Calling `getBarsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the bar elements that are at that the same position of that event.

```javascript
canvas.onclick = function(evt){
var activeBars = myBarChart.getBarsAtEvent(evt);
// => activeBars is an array of bars on the canvas that are at the same position as the click event.
};
```

This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.

#### .update( )

Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.

```javascript
myBarChart.datasets[0].bars[2].value = 50;
// Would update the first dataset's value of 'March' to be 50
myBarChart.update();
// Calling update now animates the position of March from 90 to 50.
```

#### .addData( valuesArray, label )

Calling `addData(valuesArray, label)` on your Chart instance passing an array of values for each dataset, along with a label for those bars.

```javascript
// The values array passed into addData should be one for each dataset in the chart
myBarChart.addData([40, 60], "August");
// The new data will now animate at the end of the chart.
```

#### .removeData( )

Calling `removeData()` on your Chart instance will remove the first value for all datasets on the chart.

```javascript
myBarChart.removeData();
// The chart will now animate and remove the first bar
```
@@ -0,0 +1,177 @@
---
title: Radar Chart
anchor: radar-chart
---

###Introduction
A radar chart is a way of showing multiple data points and the variation between them.

They are often useful for comparing the points of two or more different data sets.

<div class="canvas-holder">
<canvas width="250" height="125"></canvas>
</div>

###Example usage

```javascript
var myRadarChart = new Chart(ctx).Radar(data, options);
```

###Data structure
```javascript
var data = {
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
datasets: [
{
label: "My First dataset",
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointColor: "rgba(220,220,220,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: [65, 59, 90, 81, 56, 55, 40]
},
{
label: "My Second dataset",
fillColor: "rgba(151,187,205,0.2)",
strokeColor: "rgba(151,187,205,1)",
pointColor: "rgba(151,187,205,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(151,187,205,1)",
data: [28, 48, 40, 19, 96, 27, 100]
}
]
};
```
For a radar chart, to provide context of what each point means, we include an array of strings that show around each point in the chart.
For the radar chart data, we have an array of datasets. Each of these is an object, with a fill colour, a stroke colour, a colour for the fill of each point, and a colour for the stroke of each point. We also have an array of data values.

The label key on each dataset is optional, and can be used when generating a scale for the chart.

### Chart options

These are the customisation options specific to Radar charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.


```javascript
{
//Boolean - Whether to show lines for each scale point
scaleShowLine : true,

//Boolean - Whether we show the angle lines out of the radar
angleShowLineOut : true,

//Boolean - Whether to show labels on the scale
scaleShowLabels : false,

// Boolean - Whether the scale should begin at zero
scaleBeginAtZero : true,

//String - Colour of the angle line
angleLineColor : "rgba(0,0,0,.1)",

//Number - Pixel width of the angle line
angleLineWidth : 1,

//String - Point label font declaration
pointLabelFontFamily : "'Arial'",

//String - Point label font weight
pointLabelFontStyle : "normal",

//Number - Point label font size in pixels
pointLabelFontSize : 10,

//String - Point label font colour
pointLabelFontColor : "#666",

//Boolean - Whether to show a dot for each point
pointDot : true,

//Number - Radius of each point dot in pixels
pointDotRadius : 3,

//Number - Pixel width of point dot stroke
pointDotStrokeWidth : 1,

//Number - amount extra to add to the radius to cater for hit detection outside the drawn point
pointHitDetectionRadius : 20,

//Boolean - Whether to show a stroke for datasets
datasetStroke : true,

//Number - Pixel width of dataset stroke
datasetStrokeWidth : 2,

//Boolean - Whether to fill the dataset with a colour
datasetFill : true,
{% raw %}
//String - A legend template
legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].lineColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
{% endraw %}
}
```


You can override these for your `Chart` instance by passing a second argument into the `Radar` method as an object with the keys you want to override.

For example, we could have a radar chart without a point for each on piece of data by doing the following:

```javascript
new Chart(ctx).Radar(data, {
pointDot: false
});
// This will create a chart with all of the default options, merged from the global config,
// and the Bar chart defaults but this particular instance will have `pointDot` set to false.
```

We can also change these defaults values for each Radar type that is created, this object is available at `Chart.defaults.Radar`.


### Prototype methods

#### .getPointsAtEvent( event )

Calling `getPointsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the point elements that are at that the same position of that event.

```javascript
canvas.onclick = function(evt){
var activePoints = myRadarChart.getPointsAtEvent(evt);
// => activePoints is an array of points on the canvas that are at the same position as the click event.
};
```

This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.

#### .update( )

Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.

```javascript
myRadarChart.datasets[0].points[2].value = 50;
// Would update the first dataset's value of 'Sleeping' to be 50
myRadarChart.update();
// Calling update now animates the position of Sleeping from 90 to 50.
```

#### .addData( valuesArray, label )

Calling `addData(valuesArray, label)` on your Chart instance passing an array of values for each dataset, along with a label for those points.

```javascript
// The values array passed into addData should be one for each dataset in the chart
myRadarChart.addData([40, 60], "Dancing");
// The new data will now animate at the end of the chart.
```

#### .removeData( )

Calling `removeData()` on your Chart instance will remove the first value for all datasets on the chart.

```javascript
myRadarChart.removeData();
// Other points will now animate to their correct positions.
```
@@ -0,0 +1,172 @@
---
title: Polar Area Chart
anchor: polar-area-chart
---
### Introduction
Polar area charts are similar to pie charts, but each segment has the same angle - the radius of the segment differs depending on the value.

This type of chart is often useful when we want to show a comparison data similar to a pie chart, but also show a scale of values for context.

<div class="canvas-holder">
<canvas width="250" height="125"></canvas>
</div>

### Example usage

```javascript
new Chart(ctx).PolarArea(data, options);
```

### Data structure

```javascript
var data = [
{
value: 300,
color:"#F7464A",
highlight: "#FF5A5E",
label: "Red"
},
{
value: 50,
color: "#46BFBD",
highlight: "#5AD3D1",
label: "Green"
},
{
value: 100,
color: "#FDB45C",
highlight: "#FFC870",
label: "Yellow"
},
{
value: 40,
color: "#949FB1",
highlight: "#A8B3C5",
label: "Grey"
},
{
value: 120,
color: "#4D5360",
highlight: "#616774",
label: "Dark Grey"
}

];
```
As you can see, for the chart data you pass in an array of objects, with a value and a colour. The value attribute should be a number, while the color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.

### Chart options

These are the customisation options specific to Polar Area charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.

```javascript
{
//Boolean - Show a backdrop to the scale label
scaleShowLabelBackdrop : true,

//String - The colour of the label backdrop
scaleBackdropColor : "rgba(255,255,255,0.75)",

// Boolean - Whether the scale should begin at zero
scaleBeginAtZero : true,

//Number - The backdrop padding above & below the label in pixels
scaleBackdropPaddingY : 2,

//Number - The backdrop padding to the side of the label in pixels
scaleBackdropPaddingX : 2,

//Boolean - Show line for each value in the scale
scaleShowLine : true,

//Boolean - Stroke a line around each segment in the chart
segmentShowStroke : true,

//String - The colour of the stroke on each segement.
segmentStrokeColor : "#fff",

//Number - The width of the stroke value in pixels
segmentStrokeWidth : 2,

//Number - Amount of animation steps
animationSteps : 100,

//String - Animation easing effect.
animationEasing : "easeOutBounce",

//Boolean - Whether to animate the rotation of the chart
animateRotate : true,

//Boolean - Whether to animate scaling the chart from the centre
animateScale : false,
{% raw %}
//String - A legend template
legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
{% endraw %}
}
```

You can override these for your `Chart` instance by passing a second argument into the `PolarArea` method as an object with the keys you want to override.

For example, we could have a polar area chart with a black stroke on each segment like so:

```javascript
new Chart(ctx).PolarArea(data, {
segmentStrokeColor: "#000000"
});
// This will create a chart with all of the default options, merged from the global config,
// and the PolarArea chart defaults but this particular instance will have `segmentStrokeColor` set to `"#000000"`.
```

We can also change these defaults values for each PolarArea type that is created, this object is available at `Chart.defaults.PolarArea`.

### Prototype methods

#### .getSegmentsAtEvent( event )

Calling `getSegmentsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the segment elements that are at that the same position of that event.

```javascript
canvas.onclick = function(evt){
var activePoints = myPolarAreaChart.getSegmentsAtEvent(evt);
// => activePoints is an array of segments on the canvas that are at the same position as the click event.
};
```

This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.

#### .update( )

Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.

```javascript
myPolarAreaChart.segments[1].value = 10;
// Would update the first dataset's value of 'Green' to be 10
myPolarAreaChart.update();
// Calling update now animates the position of Green from 50 to 10.
```

#### .addData( segmentData, index )

Calling `addData(segmentData, index)` on your Chart instance passing an object in the same format as in the constructor. There is an option second argument of 'index', this determines at what index the new segment should be inserted into the chart.

```javascript
// An object in the same format as the original data source
myPolarAreaChart.addData({
value: 130,
color: "#B48EAD",
highlight: "#C69CBE",
label: "Purple"
});
// The new segment will now animate in.
```

#### .removeData( index )

Calling `removeData(index)` on your Chart instance will remove segment at that particular index. If none is provided, it will default to the last segment.

```javascript
myPolarAreaChart.removeData();
// Other segments will update to fill the empty space left.
```
@@ -0,0 +1,158 @@
---
title: Pie & Doughnut Charts
anchor: doughnut-pie-chart
---
###Introduction
Pie and doughnut charts are probably the most commonly used chart there are. They are divided into segments, the arc of each segment shows the proportional value of each piece of data.

They are excellent at showing the relational proportions between data.

Pie and doughnut charts are effectively the same class in Chart.js, but have one different default value - their `percentageInnerCutout`. This equates what percentage of the inner should be cut out. This defaults to `0` for pie charts, and `50` for doughnuts.

They are also registered under two aliases in the `Chart` core. Other than their different default value, and different alias, they are exactly the same.

<div class="canvas-holder half">
<canvas width="250" height="125"></canvas>
</div>

<div class="canvas-holder half">
<canvas width="250" height="125"></canvas>
</div>


### Example usage

```javascript
// For a pie chart
var myPieChart = new Chart(ctx[0]).Pie(data,options);

// And for a doughnut chart
var myDoughnutChart = new Chart(ctx[1]).Doughnut(data,options);
```

### Data structure

```javascript
var data = [
{
value: 300,
color:"#F7464A",
highlight: "#FF5A5E",
label: "Red"
},
{
value: 50,
color: "#46BFBD",
highlight: "#5AD3D1",
label: "Green"
},
{
value: 100,
color: "#FDB45C",
highlight: "#FFC870",
label: "Yellow"
}
]
```

For a pie chart, you must pass in an array of objects with a value and a color property. The value attribute should be a number, Chart.js will total all of the numbers and calculate the relative proportion of each. The color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.

### Chart options

These are the customisation options specific to Pie & Doughnut charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.

```javascript
{
//Boolean - Whether we should show a stroke on each segment
segmentShowStroke : true,

//String - The colour of each segment stroke
segmentStrokeColor : "#fff",

//Number - The width of each segment stroke
segmentStrokeWidth : 2,

//Number - The percentage of the chart that we cut out of the middle
percentageInnerCutout : 50, // This is 0 for Pie charts

//Number - Amount of animation steps
animationSteps : 100,

//String - Animation easing effect
animationEasing : "easeOutBounce",

//Boolean - Whether we animate the rotation of the Doughnut
animateRotate : true,

//Boolean - Whether we animate scaling the Doughnut from the centre
animateScale : false,
{% raw %}
//String - A legend template
legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
{% endraw %}
}
```
You can override these for your `Chart` instance by passing a second argument into the `Doughnut` method as an object with the keys you want to override.

For example, we could have a doughnut chart that animates by scaling out from the centre like so:

```javascript
new Chart(ctx).Doughnut(data, {
animateScale: true
});
// This will create a chart with all of the default options, merged from the global config,
// and the Doughnut chart defaults but this particular instance will have `animateScale` set to `true`.
```

We can also change these default values for each Doughnut type that is created, this object is available at `Chart.defaults.Doughnut`. Pie charts also have a clone of these defaults available to change at `Chart.defaults.Pie`, with the only difference being `percentageInnerCutout` being set to 0.

### Prototype methods

#### .getSegmentsAtEvent( event )

Calling `getSegmentsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the segment elements that are at the same position of that event.

```javascript
canvas.onclick = function(evt){
var activePoints = myDoughnutChart.getSegmentsAtEvent(evt);
// => activePoints is an array of segments on the canvas that are at the same position as the click event.
};
```

This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.

#### .update( )

Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.

```javascript
myDoughnutChart.segments[1].value = 10;
// Would update the first dataset's value of 'Green' to be 10
myDoughnutChart.update();
// Calling update now animates the circumference of the segment 'Green' from 50 to 10.
// and transitions other segment widths
```

#### .addData( segmentData, index )

Calling `addData(segmentData, index)` on your Chart instance passing an object in the same format as in the constructor. There is an optional second argument of 'index', this determines at what index the new segment should be inserted into the chart.

```javascript
// An object in the same format as the original data source
myDoughnutChart.addData({
value: 130,
color: "#B48EAD",
highlight: "#C69CBE",
label: "Purple"
});
// The new segment will now animate in.
```

#### .removeData( index )

Calling `removeData(index)` on your Chart instance will remove segment at that particular index. If none is provided, it will default to the last segment.

```javascript
myDoughnutChart.removeData();
// Other segments will update to fill the empty space left.
```
@@ -0,0 +1,185 @@
---
title: Advanced usage
anchor: advanced-usage
---


### Prototype methods

For each chart, there are a set of global prototype methods on the shared `ChartType` which you may find useful. These are available on all charts created with Chart.js, but for the examples, let's use a line chart we've made.

```javascript
// For example:
var myLineChart = new Chart(ctx).Line(data);
```

#### .clear()

Will clear the chart canvas. Used extensively internally between animation frames, but you might find it useful.

```javascript
// Will clear the canvas that myLineChart is drawn on
myLineChart.clear();
// => returns 'this' for chainability
```

#### .stop()

Use this to stop any current animation loop. This will pause the chart during any current animation frame. Call `.render()` to re-animate.

```javascript
// Stops the charts animation loop at its current frame
myLineChart.stop();
// => returns 'this' for chainability
```

#### .resize()

Use this to manually resize the canvas element. This is run each time the browser is resized, but you can call this method manually if you change the size of the canvas nodes container element.

```javascript
// Resizes & redraws to fill its container element
myLineChart.resize();
// => returns 'this' for chainability
```

#### .destroy()

Use this to destroy any chart instances that are created. This will clean up any references stored to the chart object within Chart.js, along with any associated event listeners attached by Chart.js.

```javascript
// Destroys a specific chart instance
myLineChart.destroy();
```

#### .toBase64Image()

This returns a base 64 encoded string of the chart in it's current state.

```javascript
myLineChart.toBase64Image();
// => returns png data url of the image on the canvas
```

#### .generateLegend()

Returns an HTML string of a legend for that chart. The template for this legend is at `legendTemplate` in the chart options.

```javascript
myLineChart.generateLegend();
// => returns HTML string of a legend for this chart
```

### External Tooltips

You can enable custom tooltips in the global or chart configuration like so:

```javascript
var myPieChart = new Chart(ctx).Pie(data, {
customTooltips: function(tooltip) {

// tooltip will be false if tooltip is not visible or should be hidden
if (!tooltip) {
return;
}

// Otherwise, tooltip will be an object with all tooltip properties like:

// tooltip.caretHeight
// tooltip.caretPadding
// tooltip.chart
// tooltip.cornerRadius
// tooltip.fillColor
// tooltip.font...
// tooltip.text
// tooltip.x
// tooltip.y
// etc...

};
});
```

See files `sample/pie-customTooltips.html` and `sample/line-customTooltips.html` for examples on how to get started.


### Writing new chart types

Chart.js 1.0 has been rewritten to provide a platform for developers to create their own custom chart types, and be able to share and utilise them through the Chart.js API.

The format is relatively simple, there are a set of utility helper methods under `Chart.helpers`, including things such as looping over collections, requesting animation frames, and easing equations.

On top of this, there are also some simple base classes of Chart elements, these all extend from `Chart.Element`, and include things such as points, bars and scales.

```javascript
Chart.Type.extend({
// Passing in a name registers this chart in the Chart namespace
name: "Scatter",
// Providing a defaults will also register the deafults in the chart namespace
defaults : {
options: "Here",
available: "at this.options"
},
// Initialize is fired when the chart is initialized - Data is passed in as a parameter
// Config is automatically merged by the core of Chart.js, and is available at this.options
initialize: function(data){
this.chart.ctx // The drawing context for this chart
this.chart.canvas // the canvas node for this chart
},
// Used to draw something on the canvas
draw: function() {
}
});

// Now we can create a new instance of our chart, using the Chart.js API
new Chart(ctx).Scatter(data);
// initialize is now run
```

### Extending existing chart types

We can also extend existing chart types, and expose them to the API in the same way. Let's say for example, we might want to run some more code when we initialize every Line chart.

```javascript
// Notice now we're extending the particular Line chart type, rather than the base class.
Chart.types.Line.extend({
// Passing in a name registers this chart in the Chart namespace in the same way
name: "LineAlt",
initialize: function(data){
console.log('My Line chart extension');
Chart.types.Line.prototype.initialize.apply(this, arguments);
}
});

// Creates a line chart in the same way
new Chart(ctx).LineAlt(data);
// but this logs 'My Line chart extension' in the console.
```

### Community extensions

- <a href="https://github.com/Regaddi/Chart.StackedBar.js" target"_blank">Stacked Bar Chart</a> by <a href="https://twitter.com/Regaddi" target="_blank">@Regaddi</a>
- <a href="https://github.com/CAYdenberg/Chart.js" target"_blank">Error bars (bar and line charts)</a> by <a href="https://twitter.com/CAYdenberg" target="_blank">@CAYdenberg</a>

### Creating custom builds

Chart.js uses <a href="http://gulpjs.com/" target="_blank">gulp</a> to build the library into a single JavaScript file. We can use this same build script with custom parameters in order to build a custom version.

Firstly, we need to ensure development dependencies are installed. With node and npm installed, after cloning the Chart.js repo to a local directory, and navigating to that directory in the command line, we can run the following:

```bash
npm install
npm install -g gulp
```

This will install the local development dependencies for Chart.js, along with a CLI for the JavaScript task runner <a href="http://gulpjs.com/" target="_blank">gulp</a>.

Now, we can run the `gulp build` task, and pass in a comma seperated list of types as an argument to build a custom version of Chart.js with only specified chart types.

Here we will create a version of Chart.js with only Line, Radar and Bar charts included:

```bash
gulp build --types=Line,Radar,Bar
```

This will output to the `/custom` directory, and write two files, Chart.js, and Chart.min.js with only those chart types included.
@@ -0,0 +1,42 @@
---
title: Notes
anchor: notes
---

### Browser support
Browser support for the canvas element is available in all modern & major mobile browsers <a href="http://caniuse.com/canvas" target="_blank">(caniuse.com/canvas)</a>.

For IE8 & below, I would recommend using the polyfill ExplorerCanvas - available at <a href="https://code.google.com/p/explorercanvas/" target="_blank">https://code.google.com/p/explorercanvas/</a>. It falls back to Internet explorer's format VML when canvas support is not available. Example use:

```html
<head>
<!--[if lte IE 8]>
<script src="excanvas.js"></script>
<![endif]-->
</head>
```

Usually I would recommend feature detection to choose whether or not to load a polyfill, rather than IE conditional comments, however in this case, VML is a Microsoft proprietary format, so it will only work in IE.

Some important points to note in my experience using ExplorerCanvas as a fallback.

- Initialise charts on load rather than DOMContentReady when using the library, as sometimes a race condition will occur, and it will result in an error when trying to get the 2d context of a canvas.
- New VML DOM elements are being created for each animation frame and there is no hardware acceleration. As a result animation is usually slow and jerky, with flashing text. It is a good idea to dynamically turn off animation based on canvas support. I recommend using the excellent <a href="http://modernizr.com/" target="_blank">Modernizr</a> to do this.
- When declaring fonts, the library explorercanvas requires the font name to be in single quotes inside the string. For example, instead of your scaleFontFamily property being simply "Arial", explorercanvas support, use "'Arial'" instead. Chart.js does this for default values.

### Bugs & issues

Please report these on the GitHub page - at <a href="https://github.com/nnnick/Chart.js" target="_blank">github.com/nnnick/Chart.js</a>. If you could include a link to a simple <a href="http://jsbin.com/" target="_blank">jsbin</a> or similar to demonstrate the issue, that'd be really helpful.


### Contributing
New contributions to the library are welcome, just a couple of guidelines:

- Tabs for indentation, not spaces please.
- Please ensure you're changing the individual files in `/src`, not the concatenated output in the `Chart.js` file in the root of the repo.
- Please check that your code will pass `jshint` code standards, `gulp jshint` will run this for you.
- Please keep pull requests concise, and document new functionality in the relevant `.md` file.
- Consider whether your changes are useful for all users, or if creating a Chart.js extension would be more appropriate.

### License
Chart.js is open source and available under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>.
@@ -0,0 +1,137 @@
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
util = require('gulp-util'),
jshint = require('gulp-jshint'),
size = require('gulp-size'),
connect = require('gulp-connect'),
replace = require('gulp-replace'),
htmlv = require('gulp-html-validator'),
inquirer = require('inquirer'),
semver = require('semver'),
exec = require('child_process').exec,
fs = require('fs'),
package = require('./package.json'),
bower = require('./bower.json');

var srcDir = './src/';
/*
* Usage : gulp build --types=Bar,Line,Doughnut
* Output: - A built Chart.js file with Core and types Bar, Line and Doughnut concatenated together
* - A minified version of this code, in Chart.min.js
*/

gulp.task('build', function(){

// Default to all of the chart types, with Chart.Core first
var srcFiles = [FileName('Core')],
isCustom = !!(util.env.types),
outputDir = (isCustom) ? 'custom' : '.';
if (isCustom){
util.env.types.split(',').forEach(function(type){ return srcFiles.push(FileName(type))});
}
else{
// Seems gulp-concat remove duplicates - nice!
// So we can use this to sort out dependency order - aka include Core first!
srcFiles.push(srcDir+'*');
}

return gulp.src(srcFiles)
.pipe(concat('Chart.js'))
.pipe(replace('{{ version }}', package.version))
.pipe(gulp.dest(outputDir))
.pipe(uglify({preserveComments:'some'}))
.pipe(concat('Chart.min.js'))
.pipe(gulp.dest(outputDir));

function FileName(moduleName){
return srcDir+'Chart.'+moduleName+'.js';
};
});

/*
* Usage : gulp bump
* Prompts: Version increment to bump
* Output: - New version number written into package.json & bower.json
*/

gulp.task('bump', function(complete){
util.log('Current version:', util.colors.cyan(package.version));
var choices = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'].map(function(versionType){
return versionType + ' (v' + semver.inc(package.version, versionType) + ')';
});
inquirer.prompt({
type: 'list',
name: 'version',
message: 'What version update would you like?',
choices: choices
}, function(res){
var increment = res.version.split(' ')[0],
newVersion = semver.inc(package.version, increment);

// Set the new versions into the bower/package object
package.version = newVersion;
bower.version = newVersion;

// Write these to their own files, then build the output
fs.writeFileSync('package.json', JSON.stringify(package, null, 2));
fs.writeFileSync('bower.json', JSON.stringify(bower, null, 2));

complete();
});
});

gulp.task('release', ['build'], function(){
exec('git tag -a v' + package.version);
});

gulp.task('jshint', function(){
return gulp.src(srcDir + '*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});

gulp.task('valid', function(){
return gulp.src('samples/*.html')
.pipe(htmlv());
});

gulp.task('library-size', function(){
return gulp.src('Chart.min.js')
.pipe(size({
gzip: true
}));
});

gulp.task('module-sizes', function(){
return gulp.src(srcDir + '*.js')
.pipe(uglify({preserveComments:'some'}))
.pipe(size({
showFiles: true,
gzip: true
}))
});

gulp.task('watch', function(){
gulp.watch('./src/*', ['build']);
});

gulp.task('test', ['jshint', 'valid']);

gulp.task('size', ['library-size', 'module-sizes']);

gulp.task('default', ['build', 'watch']);

gulp.task('server', function(){
connect.server({
port: 8000,
});
});

// Convenience task for opening the project straight from the command line
gulp.task('_open', function(){
exec('open http://localhost:8000');
exec('subl .');
});

gulp.task('dev', ['server', 'default']);
@@ -0,0 +1,25 @@
{
"name": "chart.js",
"homepage": "http://www.chartjs.org",
"description": "Simple HTML5 charts using the canvas element.",
"version": "1.0.1",
"main": "Chart.js",
"repository": {
"type": "git",
"url": "https://github.com/nnnick/Chart.js.git"
},
"dependences": {},
"devDependencies": {
"gulp": "3.5.x",
"gulp-concat": "~2.1.x",
"gulp-connect": "~2.0.5",
"gulp-jshint": "~1.5.1",
"gulp-replace": "^0.4.0",
"gulp-size": "~0.4.0",
"gulp-uglify": "~0.2.x",
"gulp-util": "~2.2.x",
"gulp-html-validator": "^0.0.2",
"inquirer": "^0.5.1",
"semver": "^3.0.1"
}
}
@@ -0,0 +1,45 @@
<!doctype html>
<html>
<head>
<title>Bar Chart</title>
<script src="../Chart.js"></script>
</head>
<body>
<div style="width: 50%">
<canvas id="canvas" height="450" width="600"></canvas>
</div>


<script>
var randomScalingFactor = function(){ return Math.round(Math.random()*100)};

var barChartData = {
labels : ["January","February","March","April","May","June","July"],
datasets : [
{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,0.8)",
highlightFill: "rgba(220,220,220,0.75)",
highlightStroke: "rgba(220,220,220,1)",
data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
},
{
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,0.8)",
highlightFill : "rgba(151,187,205,0.75)",
highlightStroke : "rgba(151,187,205,1)",
data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
}
]

}
window.onload = function(){
var ctx = document.getElementById("canvas").getContext("2d");
window.myBar = new Chart(ctx).Bar(barChartData, {
responsive : true
});
}

</script>
</body>
</html>