feat:Added piechart in Dashboard

This commit is contained in:
2025-02-22 15:35:48 +05:30
parent 357071b967
commit f7cb1af2c4
384 changed files with 112765 additions and 8 deletions
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Fuzzy
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.
+50
View File
@@ -0,0 +1,50 @@
# svg.easing.js
Additional easing equations for the fx module in the [svgjs.com](http://svgjs.com) library.
Svg.easing.js is licensed under the terms of the MIT License.
## Usage
Include this plugin after including the svg.js library in your html document.
To use the custom easing methods:
```javascript
var draw = SVG('paper').size(400, 400)
var rect = draw.rect(100, 100)
rect.animate(500, SVG.easing.bounce).move(300, 300)
```
Available easing methods are:
- `SVG.easing.quadIn`
- `SVG.easing.quadOut`
- `SVG.easing.quadInOut`
- `SVG.easing.cubicIn`
- `SVG.easing.cubicOut`
- `SVG.easing.cubicInOut`
- `SVG.easing.quartIn`
- `SVG.easing.quartOut`
- `SVG.easing.quartInOut`
- `SVG.easing.quintIn`
- `SVG.easing.quintOut`
- `SVG.easing.quintInOut`
- `SVG.easing.sineIn`
- `SVG.easing.sineOut`
- `SVG.easing.sineInOut`
- `SVG.easing.expoIn`
- `SVG.easing.expoOut`
- `SVG.easing.expoInOut`
- `SVG.easing.circIn`
- `SVG.easing.circOut`
- `SVG.easing.circInOut`
- `SVG.easing.backIn`
- `SVG.easing.backOut`
- `SVG.easing.backInOut`
- `SVG.easing.swingFromTo`
- `SVG.easing.swingFrom`
- `SVG.easing.swingTo`
- `SVG.easing.bounce`
- `SVG.easing.bounceOut`
- `SVG.easing.elastic`
+179
View File
@@ -0,0 +1,179 @@
/*! svg.easing.js - v2.0.0 - 2016-04-25
* https://github.com/wout/svg.easing.js
* Copyright (c) 2016 Wout Fierens; Licensed MIT */
// Based on Easing Equations (c) 2003 [Robert Penner](http://www.robertpenner.com/), all rights reserved.
(function() {
var easing = {
quadIn: function(pos) {
return Math.pow(pos, 2)
}
, quadOut: function(pos) {
return -(Math.pow((pos - 1), 2) - 1)
}
, quadInOut: function(pos) {
if ((pos /= 0.5) < 1) return 0.5 * Math.pow(pos, 2)
return -0.5 * ((pos -= 2) * pos - 2)
}
, cubicIn: function(pos) {
return Math.pow(pos, 3)
}
, cubicOut: function(pos) {
return (Math.pow((pos - 1), 3) + 1)
}
, cubicInOut: function(pos) {
if ((pos /= 0.5) < 1) return 0.5 * Math.pow(pos,3)
return 0.5 * (Math.pow((pos - 2), 3) + 2)
}
, quartIn: function(pos) {
return Math.pow(pos, 4)
}
, quartOut: function(pos) {
return -(Math.pow((pos-1), 4) -1)
}
, quartInOut: function(pos) {
if ((pos /= 0.5) < 1) return 0.5 * Math.pow(pos, 4)
return -0.5 * ((pos -= 2) * Math.pow(pos, 3) - 2)
}
, quintIn: function(pos) {
return Math.pow(pos, 5)
}
, quintOut: function(pos) {
return (Math.pow((pos-1), 5) +1)
}
, quintInOut: function(pos) {
if ((pos /= 0.5) < 1) return 0.5 * Math.pow(pos, 5)
return 0.5 * (Math.pow((pos - 2), 5) + 2)
}
, sineIn: function(pos) {
return -Math.cos(pos * (Math.PI / 2)) + 1
}
, sineOut: function(pos) {
return Math.sin(pos * (Math.PI / 2))
}
, sineInOut: function(pos) {
return (-.5 * (Math.cos(Math.PI * pos) -1))
}
, expoIn: function(pos) {
return (pos==0) ? 0 : Math.pow(2, 10 * (pos - 1))
}
, expoOut: function(pos) {
return (pos==1) ? 1 : -Math.pow(2, -10 * pos) + 1
}
, expoInOut: function(pos) {
if(pos==0) return 0
if(pos==1) return 1
if((pos/=0.5) < 1) return 0.5 * Math.pow(2,10 * (pos-1))
return 0.5 * (-Math.pow(2, -10 * --pos) + 2)
}
, circIn: function(pos) {
return -(Math.sqrt(1 - (pos*pos)) - 1)
}
, circOut: function(pos) {
return Math.sqrt(1 - Math.pow((pos-1), 2))
}
, circInOut: function(pos) {
if((pos/=0.5) < 1) return -0.5 * (Math.sqrt(1 - pos*pos) - 1)
return 0.5 * (Math.sqrt(1 - (pos-=2)*pos) + 1)
}
, backIn: function (pos) {
var s = 1.70158
return pos * pos * ((s + 1) * pos - s)
}
, backOut: function (pos) {
pos = pos - 1
var s = 1.70158
return pos * pos * ((s + 1) * pos + s) + 1
}
, backInOut: function (pos) {
var s = 1.70158
if((pos/=0.5) < 1) return 0.5*(pos*pos*(((s*=(1.525))+1)*pos -s))
return 0.5*((pos-=2)*pos*(((s*=(1.525))+1)*pos +s) +2)
}
, swingFromTo: function(pos) {
var s = 1.70158
return ((pos/=0.5) < 1) ? 0.5*(pos*pos*(((s*=(1.525))+1)*pos - s)) :
0.5*((pos-=2)*pos*(((s*=(1.525))+1)*pos + s) + 2)
}
, swingFrom: function(pos) {
var s = 1.70158
return pos*pos*((s+1)*pos - s)
}
, swingTo: function(pos) {
var s = 1.70158
return (pos-=1)*pos*((s+1)*pos + s) + 1
}
, bounce: function(pos) {
var s = 7.5625,
p = 2.75,
l
if (pos < (1 / p)) {
l = s * pos * pos
} else {
if (pos < (2 / p)) {
pos -= (1.5 / p)
l = s * pos * pos + .75
} else {
if (pos < (2.5 / p)) {
pos -= (2.25 / p)
l = s * pos * pos + .9375
} else {
pos -= (2.625 / p)
l = s * pos * pos + .984375
}
}
}
return l
}
, bounceOut: function(pos){
if ((pos) < (1/2.75)) {
return (7.5625*pos*pos)
} else if (pos < (2/2.75)) {
return (7.5625*(pos-=(1.5/2.75))*pos + .75)
} else if (pos < (2.5/2.75)) {
return (7.5625*(pos-=(2.25/2.75))*pos + .9375)
} else {
return (7.5625*(pos-=(2.625/2.75))*pos + .984375)
}
}
, elastic: function(pos) {
if (pos == !!pos) return pos
return Math.pow(2, -10 * pos) * Math.sin((pos - 0.075) * (2 * Math.PI) / .3) + 1
}
}
for (key in easing)
SVG.easing[key] = easing[key]
})()
+4
View File
@@ -0,0 +1,4 @@
/*! svg.easing.js - v2.0.0 - 2016-04-25
* https://github.com/wout/svg.easing.js
* Copyright (c) 2016 Wout Fierens; Licensed MIT */
!function(){var a={quadIn:function(a){return Math.pow(a,2)},quadOut:function(a){return-(Math.pow(a-1,2)-1)},quadInOut:function(a){return(a/=.5)<1?.5*Math.pow(a,2):-.5*((a-=2)*a-2)},cubicIn:function(a){return Math.pow(a,3)},cubicOut:function(a){return Math.pow(a-1,3)+1},cubicInOut:function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)},quartIn:function(a){return Math.pow(a,4)},quartOut:function(a){return-(Math.pow(a-1,4)-1)},quartInOut:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},quintIn:function(a){return Math.pow(a,5)},quintOut:function(a){return Math.pow(a-1,5)+1},quintInOut:function(a){return(a/=.5)<1?.5*Math.pow(a,5):.5*(Math.pow(a-2,5)+2)},sineIn:function(a){return-Math.cos(a*(Math.PI/2))+1},sineOut:function(a){return Math.sin(a*(Math.PI/2))},sineInOut:function(a){return-.5*(Math.cos(Math.PI*a)-1)},expoIn:function(a){return 0==a?0:Math.pow(2,10*(a-1))},expoOut:function(a){return 1==a?1:-Math.pow(2,-10*a)+1},expoInOut:function(a){return 0==a?0:1==a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},circIn:function(a){return-(Math.sqrt(1-a*a)-1)},circOut:function(a){return Math.sqrt(1-Math.pow(a-1,2))},circInOut:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},backInOut:function(a){var b=1.70158;return(a/=.5)<1?.5*a*a*(((b*=1.525)+1)*a-b):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},swingFromTo:function(a){var b=1.70158;return(a/=.5)<1?.5*a*a*(((b*=1.525)+1)*a-b):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},swingFrom:function(a){var b=1.70158;return a*a*((b+1)*a-b)},swingTo:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},bounce:function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b},bounceOut:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},elastic:function(a){return a==!!a?a:Math.pow(2,-10*a)*Math.sin(2*(a-.075)*Math.PI/.3)+1}};for(key in a)SVG.easing[key]=a[key]}();
+41
View File
@@ -0,0 +1,41 @@
{
"name": "svg.easing.js",
"version": "2.0.0",
"description": "Additional easing equations for the fx module in the svgjs.com library",
"main": "dist/svg.easing.js",
"keywords": [
"svg.js",
"easing"
],
"bugs": "https://github.com/wout/svg.easing.js/issues",
"license": "MIT",
"author": {
"name": "Wout Fierens"
},
"contributors": [
{ "name": "Wout Fierens" }
],
"homepage": "https://github.com/wout/svg.easing.js",
"files": [
"dist/"
],
"repository": {
"type": "git",
"url": "https://github.com/wout/svg.easing.js.git"
},
"engines": {
"node": ">= 0.8.0"
},
"devDependencies": {
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-watch": "~0.4.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-copy": "^0.7.0",
"grunt": "~0.4.5",
"grunt-bumper": "^1.0.4"
},
"dependencies": {
"svg.js":">=2.3.x"
}
}