├── .gitattributes ├── LICENSE ├── build └── tasks │ └── jupyter-echarts.js ├── changelog.md ├── echarts ├── echarts-gl.min.js ├── echarts-liquidfill.min.js ├── echarts-wordcloud.min.js ├── echarts.min.js └── main.js ├── gulpfile.js ├── index.html ├── package-lock.json ├── package.json ├── readme.md ├── registry.json ├── src └── main.ts ├── tsconfig.json └── wallpaper.jpg /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html linguist-language=JavaScript -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 jaska 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /build/tasks/jupyter-echarts.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | 3 | var ts = require("gulp-typescript"); 4 | var fs = require("fs"); 5 | const pug = require("pug"); 6 | const path = require("path"); 7 | var tsProject = ts.createProject("tsconfig.json"); 8 | var minify = require("gulp-minify"); 9 | var rename = require('gulp-rename'); 10 | 11 | FILES = [ 12 | './node_modules/echarts/dist/echarts.min.js', 13 | './node_modules/echarts-gl/dist/echarts-gl.min.js', 14 | './node_modules/echarts-liquidfill/dist/echarts-liquidfill.min.js', 15 | './node_modules/echarts-wordcloud/dist/echarts-wordcloud.min.js', 16 | ] 17 | 18 | FILE_MAP = { 19 | "echarts": 'echarts.min', 20 | "echartsgl": 'echarts-gl.min', 21 | "liquidfill": 'echarts-liquidfill.min', 22 | "wordcloud": 'echarts-wordcloud.min' 23 | } 24 | 25 | gulp.task("configuration", function () { 26 | obj = {}; 27 | obj.FILE_MAP = FILE_MAP; 28 | obj.PINYIN_MAP = {}; 29 | obj.JUPYTER_URL = '/nbextensions/echarts'; 30 | obj.JUPYTER_ENTRY = 'echarts/main'; 31 | obj.JS_FOLDER = 'echarts'; 32 | obj.GITHUB_URL = 'https://pyecharts.github.io/jupyter-echarts/echarts'; 33 | fs.writeFile('./registry.json', JSON.stringify(obj, null, 4), function (err){ 34 | if (err) throw err; 35 | }); 36 | 37 | }); 38 | 39 | gulp.task("main", function(){ 40 | tsProject.src() 41 | .pipe(tsProject()) 42 | .js.pipe(gulp.dest("dist")); 43 | gulp.src(['dist/main.js']) 44 | .pipe(minify({ 45 | ext: { src: ".js", min: ".js"} 46 | })) 47 | .pipe(gulp.dest('echarts')); 48 | return gulp.src(FILES, {base: './node_modules'}) 49 | .pipe(rename({dirname: ''})) 50 | .pipe(gulp.dest('echarts')); 51 | }); 52 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Change log 2 | 3 | ## 1.4.3 - 8.04.2019 4 | 5 | ### Updated 6 | 7 | * echarts 4.1.0 -> 4.2.1 8 | 9 | ## 1.4.1 - 28.07.2018 10 | 11 | ### Updated 12 | 13 | * echarts 4.0.4 -> 4.1.0 14 | * echarts-gl 1.1.0 -> 1.1.1 15 | * echarts-liquidfill 2.0.0 -> 2.0.1 16 | 17 | ## 1.4.0 - 02.2018 18 | 19 | ### Updated 20 | * echarts 3.6.2 -> 4.0.4 21 | * echarts-gl 1.0.0-b4 -> 1.1.0 22 | * echarts-liquidfill 1.0.5 -> 2.0.0 23 | * echarts-wordcloud 1.1.0 -> 1.1.2 24 | 25 | ## 1.3.7 - 23.02.2018 26 | 27 | ### Removed 28 | 1. all map js files. 29 | 30 | ## 1.3.6 - 03.02.2018 31 | 32 | ###Added 33 | 34 | 1. Kai zhou district is added to Chong Qing City. 35 | 36 | ## 1.3.5 - 23.12.2017 37 | 38 | ###Added 39 | 40 | 1. Taoyuan xian is updated as Taoyuan City 41 | 42 | 43 | ## 1.3.4 - 23.12.2017 44 | 45 | ###Added 46 | 47 | 1. Added Detailed Taiwan map, inline with other provinces 48 | 2. Added Diaoyu Island 49 | 50 | ## 1.3.3 - 16.11.2017 51 | 52 | ###Fixed 53 | 54 | 1. [#9](https://github.com/chfw/jupyter-echarts/issues/9) shanghai got chongming in 2015 55 | 56 | ## 1.3.2 - 12.11.2017 57 | 58 | ###Fixed 59 | 60 | 1. [#7](https://github.com/chfw/jupyter-echarts/issues/7) shan nan city map is missing from xi zang map 61 | 62 | ## 1.3.1 - 28.09.2017 63 | 64 | ###Fixed 65 | 66 | 1. [#4](https://github.com/chfw/jupyter-echarts/issues/4) hebei map is missing 67 | 1. [#6](https://github.com/chfw/jupyter-echarts/issues/6) hubei map is missing too 68 | 1. [#3](https://github.com/chfw/jupyter-echarts/issues/3) China map is fixed due to 69 | the regression caused by 1.3.0. 70 | 71 | ## 1.3.0 - 25.09.2017 72 | 73 | ### Added 74 | 75 | 212 Countries and Regions. 76 | 77 | ## 1.2.4 - 19.09.2017 78 | 79 | ### Updated 80 | 81 | minize world.js too. 82 | 83 | ## 1.2.3 - 18.09.2017 84 | 85 | ### Updated 86 | 87 | world.js is now compressed. Total size reduction is, 844K, 85% compression rate. 88 | No loss of precision. reference: [PR 6693] (https://github.com/ecomfe/echarts/pull/6693) 89 | 90 | ## 1.2.2 - 03.09.2017 91 | 92 | ### Updated 93 | 94 | Use old names due backward compactibility concerns. 95 | 96 | ## 1.2.1 - 03.09.2017 97 | 98 | ### Fixed 99 | 100 | #. wrong pinyin(guandong) for 广东 101 | #. 阿拉善盟地图 updated 102 | 103 | ## 1.2.0 - 02.09.2017 104 | 105 | ### Updated 106 | 107 | #. Reduced echarts maps by 0.1 MB by js minification. 108 | #. Reduced echarts-china-cities-js by 0.1 MB by js minification. 109 | 110 | ### Fixed 111 | 112 | #. 阿拉善盟地图 failed to register with echarts 113 | 114 | ## 1.1.1 - 31.08.2017 115 | 116 | ### fixed 117 | 118 | [issue #2] (https://github.com/chfw/jupyter-echarts/issues/2) Add Shanxi1 back 119 | 120 | ## 1.1.0 - 30.08.2017 121 | 122 | ### added 123 | 124 | included echarts-china-cities-js v0.0.3. bringing in 363 city maps 125 | 126 | 127 | -------------------------------------------------------------------------------- /echarts/echarts-liquidfill.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("echarts")):"function"==typeof define&&define.amd?define(["echarts"],e):"object"==typeof exports?exports["echarts-liquidfill"]=e(require("echarts")):t["echarts-liquidfill"]=e(t.echarts)}(window,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(e){return t[e]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=26)}([function(t,e){function n(t){if(null==t||"object"!=typeof t)return t;var e=t,r=v.call(t);if("[object Array]"===r){if(!c(t)){e=[];for(var i=0,a=t.length;i1e-10&&(i.width+=a/s,i.height+=a/s,i.x-=a/s/2,i.y-=a/s/2)}return i}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),i=this.style;if(t=n[0],e=n[1],r.contain(t,e)){var a=this.path.data;if(i.hasStroke()){var o=i.lineWidth,l=i.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(i.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),s.containStroke(a,o/l,t,e)))return!0}if(i.hasFill())return s.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):i.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(a.isObject(t))for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&h(t[0]-1)>1e-10&&h(t[3]-1)>1e-10?Math.sqrt(h(t[0]*t[3]-t[2]*t[1])):1}},r.extend=function(t){var e=function(e){r.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var a in n)!i.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(i[a]=n[a])}t.init&&t.init.call(this,e)};for(var n in a.inherits(e,r),t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},a.inherits(r,i);var c=r;t.exports=c},function(t,e){function n(t){return Math.sqrt(r(t))}function r(t){return t[0]*t[0]+t[1]*t[1]}function i(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function a(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var o="undefined"==typeof Float32Array?Array:Float32Array,s=n,l=r,h=i,u=a;e.create=function(t,e){var n=new o(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.clone=function(t){var e=new o(2);return e[0]=t[0],e[1]=t[1],e},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.sub=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},e.len=n,e.length=s,e.lenSquare=r,e.lengthSquare=l,e.mul=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},e.div=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.normalize=function(t,e){var r=n(e);return 0===r?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t},e.distance=i,e.dist=h,e.distanceSquare=a,e.distSquare=u,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.lerp=function(t,e,n,r){return t[0]=e[0]+r*(n[0]-e[0]),t[1]=e[1]+r*(n[1]-e[1]),t},e.applyTransform=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},function(t,e,n){function r(t,e,n,r){n<0&&(t+=n,n=-n),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=n,this.height=r}var i=n(2),a=n(9),o=i.applyTransform,s=Math.min,l=Math.max;r.prototype={constructor:r,union:function(t){var e=s(t.x,this.x),n=s(t.y,this.y);this.width=l(t.x+t.width,this.x+this.width)-e,this.height=l(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:function(){var t=[],e=[],n=[],r=[];return function(i){if(i){t[0]=n[0]=this.x,t[1]=r[1]=this.y,e[0]=r[0]=this.x+this.width,e[1]=n[1]=this.y+this.height,o(t,t,i),o(e,e,i),o(n,n,i),o(r,r,i),this.x=s(t[0],e[0],n[0],r[0]),this.y=s(t[1],e[1],n[1],r[1]);var a=l(t[0],e[0],n[0],r[0]),h=l(t[1],e[1],n[1],r[1]);this.width=a-this.x,this.height=h-this.y}}}(),calculateTransform:function(t){var e=this,n=t.width/e.width,r=t.height/e.height,i=a.create();return a.translate(i,i,[-e.x,-e.y]),a.scale(i,i,[n,r]),a.translate(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof r||(t=r.create(t));var e=this,n=e.x,i=e.x+e.width,a=e.y,o=e.y+e.height,s=t.x,l=t.x+t.width,h=t.y,u=t.y+t.height;return!(i=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new r(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},r.create=function(t){return new r(t.x,t.y,t.width,t.height)};var h=r;t.exports=h},function(t,e,n){function r(t){return t>-f&&tf||t<-f}function a(t,e,n,r,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*r+3*a*n)}function o(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}var s=n(2),l=s.create,h=s.distSquare,u=Math.pow,c=Math.sqrt,f=1e-8,d=1e-4,p=c(3),v=1/3,g=l(),y=l(),m=l();e.cubicAt=a,e.cubicDerivativeAt=function(t,e,n,r,i){var a=1-i;return 3*(((e-t)*a+2*(n-e)*i)*a+(r-n)*i*i)},e.cubicRootAt=function(t,e,n,i,a,o){var s=i+3*(e-n)-t,l=3*(n-2*e+t),h=3*(e-t),f=t-a,d=l*l-3*s*h,g=l*h-9*s*f,y=h*h-3*l*f,m=0;if(r(d)&&r(g))r(l)?o[0]=0:(O=-h/l)>=0&&O<=1&&(o[m++]=O);else{var x=g*g-4*d*y;if(r(x)){var _=g/d,w=-_/2;(O=-l/s+_)>=0&&O<=1&&(o[m++]=O),w>=0&&w<=1&&(o[m++]=w)}else if(x>0){var b=c(x),S=d*l+1.5*s*(-g+b),T=d*l+1.5*s*(-g-b);(O=(-l-((S=S<0?-u(-S,v):u(S,v))+(T=T<0?-u(-T,v):u(T,v))))/(3*s))>=0&&O<=1&&(o[m++]=O)}else{var M=(2*d*l-3*s*g)/(2*c(d*d*d)),P=Math.acos(M)/3,k=c(d),C=Math.cos(P),O=(-l-2*k*C)/(3*s),A=(w=(-l+k*(C+p*Math.sin(P)))/(3*s),(-l+k*(C-p*Math.sin(P)))/(3*s));O>=0&&O<=1&&(o[m++]=O),w>=0&&w<=1&&(o[m++]=w),A>=0&&A<=1&&(o[m++]=A)}}return m},e.cubicExtrema=function(t,e,n,a,o){var s=6*n-12*e+6*t,l=9*e+3*a-3*t-9*n,h=3*e-3*t,u=0;if(r(l))i(s)&&(d=-h/s)>=0&&d<=1&&(o[u++]=d);else{var f=s*s-4*l*h;if(r(f))o[0]=-s/(2*l);else if(f>0){var d,p=c(f),v=(-s-p)/(2*l);(d=(-s+p)/(2*l))>=0&&d<=1&&(o[u++]=d),v>=0&&v<=1&&(o[u++]=v)}}return u},e.cubicSubdivide=function(t,e,n,r,i,a){var o=(e-t)*i+t,s=(n-e)*i+e,l=(r-n)*i+n,h=(s-o)*i+o,u=(l-s)*i+s,c=(u-h)*i+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=r},e.cubicProjectPoint=function(t,e,n,r,i,o,s,l,u,f,p){var v,x,_,w,b,S=.005,T=1/0;g[0]=u,g[1]=f;for(var M=0;M<1;M+=.05)y[0]=a(t,n,i,s,M),y[1]=a(e,r,o,l,M),(w=h(g,y))=0&&w=0&&d<=1&&(o[u++]=d);else{var f=l*l-4*s*h;if(r(f))(d=-l/(2*s))>=0&&d<=1&&(o[u++]=d);else if(f>0){var d,p=c(f),v=(-l-p)/(2*s);(d=(-l+p)/(2*s))>=0&&d<=1&&(o[u++]=d),v>=0&&v<=1&&(o[u++]=v)}}return u},e.quadraticExtremum=function(t,e,n){var r=t+n-2*e;return 0===r?.5:(t-e)/r},e.quadraticSubdivide=function(t,e,n,r,i){var a=(e-t)*r+t,o=(n-e)*r+e,s=(o-a)*r+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n},e.quadraticProjectPoint=function(t,e,n,r,i,a,s,l,u){var f,p=.005,v=1/0;g[0]=s,g[1]=l;for(var x=0;x<1;x+=.05)y[0]=o(t,n,i,x),y[1]=o(e,r,a,x),(S=h(g,y))=0&&Sthis._ux||m(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,r,i,a){return this.addData(l.C,t,e,n,r,i,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,r,i,a):this._ctx.bezierCurveTo(t,e,n,r,i,a)),this._xi=i,this._yi=a,this},quadraticCurveTo:function(t,e,n,r){return this.addData(l.Q,t,e,n,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,r):this._ctx.quadraticCurveTo(t,e,n,r)),this._xi=n,this._yi=r,this},arc:function(t,e,n,r,i,a){return this.addData(l.A,t,e,n,n,r,i-r,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,r,i,a),this._xi=v(i)*n+t,this._yi=g(i)*n+t,this},arcTo:function(t,e,n,r,i){return this._ctx&&this._ctx.arcTo(t,e,n,r,i),this},rect:function(t,e,n,r){return this._ctx&&this._ctx.rect(t,e,n,r),this.addData(l.R,t,e,n,r),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;n0&&v<=t||u<0&&v>=t||0==u&&(c>0&&g<=e||c<0&&g>=e);)v+=u*(n=o[r=this._dashIdx]),g+=c*n,this._dashIdx=(r+1)%m,u>0&&vl||c>0&&gh||s[r%2?"moveTo":"lineTo"](u>=0?d(v,t):p(v,t),c>=0?d(g,e):p(g,e));u=v-t,c=g-e,this._dashOffset=-y(u*u+c*c)},_dashedBezierTo:function(t,e,n,i,a,o){var s,l,h,u,c,f=this._dashSum,d=this._dashOffset,p=this._lineDash,v=this._ctx,g=this._xi,m=this._yi,x=r.cubicAt,_=0,w=this._dashIdx,b=p.length,S=0;for(d<0&&(d=f+d),d%=f,s=0;s<1;s+=.1)l=x(g,t,n,a,s+.1)-x(g,t,n,a,s),h=x(m,e,i,o,s+.1)-x(m,e,i,o,s),_+=y(l*l+h*h);for(;wd);w++);for(s=(S-d)/_;s<=1;)u=x(g,t,n,a,s),c=x(m,e,i,o,s),w%2?v.moveTo(u,c):v.lineTo(u,c),s+=p[w]/_,w=(w+1)%b;w%2!=0&&v.lineTo(a,o),l=a-u,h=o-c,this._dashOffset=-y(l*l+h*h)},_dashedQuadraticTo:function(t,e,n,r){var i=n,a=r;n=(n+2*t)/3,r=(r+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,r,i,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,x&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=f[0]=f[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,r=0,s=0,d=0;dh||m(o-i)>u||f===c-1)&&(t.lineTo(a,o),r=a,i=o);break;case l.C:t.bezierCurveTo(s[f++],s[f++],s[f++],s[f++],s[f++],s[f++]),r=s[f-2],i=s[f-1];break;case l.Q:t.quadraticCurveTo(s[f++],s[f++],s[f++],s[f++]),r=s[f-2],i=s[f-1];break;case l.A:var p=s[f++],y=s[f++],x=s[f++],_=s[f++],w=s[f++],b=s[f++],S=s[f++],T=s[f++],M=x>_?x:_,P=x>_?1:x/_,k=x>_?_/x:1,C=w+b;Math.abs(x-_)>.001?(t.translate(p,y),t.rotate(S),t.scale(P,k),t.arc(0,0,M,w,C,1-T),t.scale(1/P,1/k),t.rotate(-S),t.translate(-p,-y)):t.arc(p,y,M,w,C,1-T),1==f&&(e=v(w)*x+p,n=g(w)*_+y),r=v(C)*x+p,i=g(C)*_+y;break;case l.R:e=r=s[f],n=i=s[f+1],t.rect(s[f++],s[f++],s[f++],s[f++]);break;case l.Z:t.closePath(),r=e,i=n}}}},_.CMD=l;var w=_;t.exports=w},function(t,e){function n(){var t=new a(6);return r(t),t}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}var a="undefined"==typeof Float32Array?Array:Float32Array;e.create=n,e.identity=r,e.copy=i,e.mul=function(t,e,n){var r=e[0]*n[0]+e[2]*n[1],i=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],o=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},e.translate=function(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t},e.rotate=function(t,e,n){var r=e[0],i=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(n),u=Math.cos(n);return t[0]=r*u+o*h,t[1]=-r*h+o*u,t[2]=i*u+s*h,t[3]=-i*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t},e.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=e[0]*r,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*i,t},e.invert=function(t,e){var n=e[0],r=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=n*o-a*r;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-r*l,t[3]=n*l,t[4]=(r*s-o*i)*l,t[5]=(a*i-n*s)*l,t):null},e.clone=function(t){var e=n();return i(e,t),e}},function(t,e,n){function r(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e=n.length&&n.push({option:t})}}),n},e.makeIdAndName=function(t){var e=o.createHashMap();s(t,function(t,n){var r=t.exist;r&&e.set(r.id,t)}),s(t,function(t,n){var r=t.option;o.assert(!r||null==r.id||!e.get(r.id)||e.get(r.id)===t,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&e.set(r.id,t),!t.keyInfo&&(t.keyInfo={})}),s(t,function(t,n){var r=t.exist,i=t.option,a=t.keyInfo;if(l(i)){if(a.name=null!=i.name?i.name+"":r?r.name:u+n,r)a.id=r.id;else if(null!=i.id)a.id=i.id+"";else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(e.get(a.id))}e.set(a.id,t)}})},e.isNameSpecified=function(t){var e=t.name;return!(!e||!e.indexOf(u))},e.isIdInner=i,e.compressBatches=function(t,e){function n(t,e,n){for(var i=0,a=t.length;is||t<-s}var i=n(9),a=n(2),o=i.identity,s=5e-5,l=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},h=l.prototype;h.transform=null,h.needLocalTransform=function(){return r(this.rotation)||r(this.position[0])||r(this.position[1])||r(this.scale[0]-1)||r(this.scale[1]-1)},h.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),r=this.transform;return n||e?(r=r||i.create(),n?this.getLocalTransform(r):o(r),e&&(n?i.mul(r,t.transform,r):i.copy(r,t.transform)),this.transform=r,this.invTransform=this.invTransform||i.create(),void i.invert(this.invTransform,r)):void(r&&o(r))},h.getLocalTransform=function(t){return l.getLocalTransform(this,t)},h.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},h.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var u=[];h.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.mul(u,t.invTransform,e),e=u);var n=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],o=this.position,s=this.scale;r(n-1)&&(n=Math.sqrt(n)),r(a-1)&&(a=Math.sqrt(a)),e[0]<0&&(n=-n),e[3]<0&&(a=-a),o[0]=e[4],o[1]=e[5],s[0]=n,s[1]=a,this.rotation=Math.atan2(-e[1]/a,e[0]/n)}},h.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),n=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(n=-n),[e,n]},h.transformCoordToLocal=function(t,e){var n=[t,e],r=this.invTransform;return r&&a.applyTransform(n,n,r),n},h.transformCoordToGlobal=function(t,e){var n=[t,e],r=this.transform;return r&&a.applyTransform(n,n,r),n},l.getLocalTransform=function(t,e){o(e=e||[]);var n=t.origin,r=t.scale||[1,1],a=t.rotation||0,s=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),i.scale(e,e,r),a&&i.rotate(e,e,a),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=s[0],e[5]+=s[1],e};var c=l;t.exports=c},function(t,e,n){function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return r(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function o(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function s(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function l(t,e,n){return t+(e-t)*n}function h(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function c(t,e){x&&u(x,e),x=m.put(t,x||e.slice())}function f(t,e){if(t){e=e||[];var n=m.get(t);if(n)return u(e,n);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in y)return u(e,y[r]),c(t,e),e;if("#"!==r.charAt(0)){var i=r.indexOf("("),s=r.indexOf(")");if(-1!==i&&s+1===r.length){var l=r.substr(0,i),f=r.substr(i+1,s-(i+1)).split(","),p=1;switch(l){case"rgba":if(4!==f.length)return void h(e,0,0,0,1);p=o(f.pop());case"rgb":return 3!==f.length?void h(e,0,0,0,1):(h(e,a(f[0]),a(f[1]),a(f[2]),p),c(t,e),e);case"hsla":return 4!==f.length?void h(e,0,0,0,1):(f[3]=o(f[3]),d(f,e),c(t,e),e);case"hsl":return 3!==f.length?void h(e,0,0,0,1):(d(f,e),c(t,e),e);default:return}}h(e,0,0,0,1)}else{var v;if(4===r.length)return(v=parseInt(r.substr(1),16))>=0&&v<=4095?(h(e,(3840&v)>>4|(3840&v)>>8,240&v|(240&v)>>4,15&v|(15&v)<<4,1),c(t,e),e):void h(e,0,0,0,1);if(7===r.length)return(v=parseInt(r.substr(1),16))>=0&&v<=16777215?(h(e,(16711680&v)>>16,(65280&v)>>8,255&v,1),c(t,e),e):void h(e,0,0,0,1)}}}function d(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=o(t[1]),a=o(t[2]),l=a<=.5?a*(i+1):a+i-a*i,u=2*a-l;return h(e=e||[],r(255*s(u,l,n+1/3)),r(255*s(u,l,n)),r(255*s(u,l,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function p(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var a=t*(e.length-1),o=Math.floor(a),s=Math.ceil(a),h=e[o],u=e[s],c=a-o;return n[0]=r(l(h[0],u[0],c)),n[1]=r(l(h[1],u[1],c)),n[2]=r(l(h[2],u[2],c)),n[3]=i(l(h[3],u[3],c)),n}}function v(t,e,n){if(e&&e.length&&t>=0&&t<=1){var a=t*(e.length-1),o=Math.floor(a),s=Math.ceil(a),h=f(e[o]),u=f(e[s]),c=a-o,d=g([r(l(h[0],u[0],c)),r(l(h[1],u[1],c)),r(l(h[2],u[2],c)),i(l(h[3],u[3],c))],"rgba");return n?{color:d,leftIndex:o,rightIndex:s,value:a}:d}}function g(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}var y={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},m=new(n(18))(20),x=null,_=p,w=v;e.parse=f,e.lift=function(t,e){var n=f(t);if(n){for(var r=0;r<3;r++)n[r]=e<0?n[r]*(1-e)|0:(255-n[r])*e+n[r]|0,n[r]>255?n[r]=255:t[r]<0&&(n[r]=0);return g(n,4===n.length?"rgba":"rgb")}},e.toHex=function(t){var e=f(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},e.fastLerp=p,e.fastMapToColor=_,e.lerp=v,e.mapToColor=w,e.modifyHSL=function(t,e,n,r){if(t=f(t))return t=function(t){if(t){var e,n,r=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),l=s-o,h=(s+o)/2;if(0===l)e=0,n=0;else{n=h<.5?l/(s+o):l/(2-s-o);var u=((s-r)/6+l/2)/l,c=((s-i)/6+l/2)/l,f=((s-a)/6+l/2)/l;r===s?e=f-c:i===s?e=1/3+u-f:a===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,h];return null!=t[3]&&d.push(t[3]),d}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(t[1]=o(n)),null!=r&&(t[2]=o(r)),g(d(t),"rgba")},e.modifyAlpha=function(t,e){if((t=f(t))&&null!=e)return t[3]=i(e),g(t,"rgba")},e.stringify=g},function(t,e){var n=function(){this.head=null,this.tail=null,this._len=0},r=n.prototype;r.insert=function(t){var e=new i(t);return this.insertEntry(e),e},r.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.len=function(){return this._len},r.clear=function(){this.head=this.tail=null,this._len=0};var i=function(t){this.value=t,this.next,this.prev},a=function(t){this._list=new n,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},o=a.prototype;o.put=function(t,e){var n=this._list,r=this._map,a=null;if(null==r[t]){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,n.insertEntry(s),r[t]=s}return a},o.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;t.exports=s},function(t,e){var n=1;"undefined"!=typeof window&&(n=Math.max(window.devicePixelRatio||1,1));var r=n;e.debugMode=0,e.devicePixelRatio=r},function(t,e,n){function r(t){if(t){t.font=b.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||P[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||k[n]?n:"top",t.textPadding&&(t.textPadding=x(t.textPadding))}}function i(t,e,n,r,i){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(r=n.width/2+n.x,i=n.height/2+n.y):a&&(r=a[0]+n.x,i=a[1]+n.y),t.translate(r,i),t.rotate(-e.textRotation),t.translate(-r,-i)}}function a(t,e,n,r,i,a,l,h){var d=r.rich[n.styleName]||{},v=n.textVerticalAlign,m=a+i/2;"top"===v?m=a+n.height/2:"bottom"===v&&(m=a+i-n.height/2),!n.isLineHolder&&o(d)&&s(t,e,d,"right"===h?l-n.width:"center"===h?l-n.width/2:l,m-n.height/2,n.width,n.height);var x=n.textPadding;x&&(l=p(l,h,x),m-=n.height/2-x[2]-n.textHeight/2),u(e,"shadowBlur",y(d.textShadowBlur,r.textShadowBlur,0)),u(e,"shadowColor",d.textShadowColor||r.textShadowColor||"transparent"),u(e,"shadowOffsetX",y(d.textShadowOffsetX,r.textShadowOffsetX,0)),u(e,"shadowOffsetY",y(d.textShadowOffsetY,r.textShadowOffsetY,0)),u(e,"textAlign",h),u(e,"textBaseline","middle"),u(e,"font",n.font||b.DEFAULT_FONT);var _=c(d.textStroke||r.textStroke,S),w=f(d.textFill||r.textFill),S=g(d.textStrokeWidth,r.textStrokeWidth);_&&(u(e,"lineWidth",S),u(e,"strokeStyle",_),e.strokeText(n.text,l,m)),w&&(u(e,"fillStyle",w),e.fillText(n.text,l,m))}function o(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function s(t,e,n,r,i,a,o){var s=n.textBackgroundColor,h=n.textBorderWidth,c=n.textBorderColor,f=_(s);if(u(e,"shadowBlur",n.textBoxShadowBlur||0),u(e,"shadowColor",n.textBoxShadowColor||"transparent"),u(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),u(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),f||h&&c){e.beginPath();var d=n.textBorderRadius;d?S.buildPath(e,{x:r,y:i,width:a,height:o,r:d}):e.rect(r,i,a,o),e.closePath()}if(f)u(e,"fillStyle",s),e.fill();else if(w(s)){var p=s.image;(p=T.createOrUpdateImage(p,null,t,l,s))&&T.isImageReady(p)&&e.drawImage(p,r,i,a,o)}h&&c&&(u(e,"lineWidth",h),u(e,"strokeStyle",c),e.stroke())}function l(t,e){e.image=t}function h(t,e,n){var r=e.x||0,i=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(n){var s=e.textPosition;if(s instanceof Array)r=n.x+d(s[0],n.width),i=n.y+d(s[1],n.height);else{var l=b.adjustTextPositionOnRect(s,n,e.textDistance);r=l.x,i=l.y,a=a||l.textAlign,o=o||l.textVerticalAlign}var h=e.textOffset;h&&(r+=h[0],i+=h[1])}return{baseX:r,baseY:i,textAlign:a,textVerticalAlign:o}}function u(t,e,n){return t[e]=M(t,e,n),t[e]}function c(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function f(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function d(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function p(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}var v=n(0),g=v.retrieve2,y=v.retrieve3,m=v.each,x=v.normalizeCssArray,_=v.isString,w=v.isObject,b=n(21),S=n(22),T=n(10),M=n(14),P={left:1,right:1,center:1},k={top:1,bottom:1,middle:1};e.normalizeTextStyle=function(t){return r(t),m(t.rich,r),t},e.renderText=function(t,e,n,r,l){r.rich?function(t,e,n,r,l){var u=t.__textCotentBlock;u&&!t.__dirty||(u=t.__textCotentBlock=b.parseRichText(n,r)),function(t,e,n,r,l){var u=n.width,c=n.outerWidth,f=n.outerHeight,d=r.textPadding,p=h(0,r,l),v=p.baseX,g=p.baseY,y=p.textAlign,m=p.textVerticalAlign;i(e,r,l,v,g);var x=b.adjustTextX(v,c,y),_=b.adjustTextY(g,f,m),w=x,S=_;d&&(w+=d[3],S+=d[0]);var T=w+u;o(r)&&s(t,e,r,x,_,c,f);for(var M=0;M=0&&"right"===(P=C[L]).textAlign;)a(t,e,P,r,A,S,B,"right"),I-=P.width,B-=P.width,L--;for(R+=(u-(R-w)-(T-B)-I)/2;D<=L;)P=C[D],a(t,e,P,r,A,S,R+P.width/2,"center"),R+=P.width,D++;S+=A}}(t,e,u,r,l)}(t,e,n,r,l):function(t,e,n,r,a){var l=u(e,"font",r.font||b.DEFAULT_FONT),d=r.textPadding,v=t.__textCotentBlock;v&&!t.__dirty||(v=t.__textCotentBlock=b.parsePlainText(n,l,d,r.truncate));var g=v.outerHeight,y=v.lines,m=v.lineHeight,x=h(0,r,a),_=x.baseX,w=x.baseY,S=x.textAlign,T=x.textVerticalAlign;i(e,r,a,_,w);var M=b.adjustTextY(w,g,T),P=_,k=M,C=o(r);if(C||d){var O=b.getWidth(n,l),A=O;d&&(A+=d[1]+d[3]);var I=b.adjustTextX(_,A,S);C&&s(t,e,r,I,M,A,g),d&&(P=p(_,S,d),k+=d[0])}u(e,"textAlign",S||"left"),u(e,"textBaseline","middle"),u(e,"shadowBlur",r.textShadowBlur||0),u(e,"shadowColor",r.textShadowColor||"transparent"),u(e,"shadowOffsetX",r.textShadowOffsetX||0),u(e,"shadowOffsetY",r.textShadowOffsetY||0),k+=m/2;var D=r.textStrokeWidth,R=c(r.textStroke,D),B=f(r.textFill);R&&(u(e,"lineWidth",D),u(e,"strokeStyle",R)),B&&u(e,"fillStyle",B);for(var L=0;Lk&&(P=0,M={}),P++,M[n]=i,i}function i(t,e,n,i,a,l){var h=p(t,e,a,l),u=r(t,e);a&&(u+=a[1]+a[3]);var c=h.outerHeight,f=o(0,u,n),d=s(0,c,i),v=new y(f,d,u,c);return v.lineHeight=h.lineHeight,v}function a(t,e,n,r,i,a,l){var h=v(t,{rich:a,truncate:l,font:e,textAlign:n,textPadding:i}),u=h.outerWidth,c=h.outerHeight,f=o(0,u,n),d=s(0,c,r);return new y(f,d,u,c)}function o(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function s(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function l(t,e,n,r,i){if(!e)return"";var a=(t+"").split("\n");i=h(e,n,r,i);for(var o=0,s=a.length;o=o;l++)s-=o;var h=r(n);return h>s&&(n="",h=0),s=t-h,i.ellipsis=n,i.ellipsisWidth=h,i.contentWidth=s,i.containerWidth=t,i}function u(t,e){var n=e.containerWidth,i=e.font,a=e.contentWidth;if(!n)return"";var o=r(t,i);if(o<=n)return t;for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?c(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;o=r(t=t.substr(0,l),i)}return""===t&&(t=e.placeholder),t}function c(t,e,n,r){for(var i=0,a=0,o=t.length;al)t="",a=[];else if(null!=c)for(var d=h(c-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),p=0,v=a.length;pa&&g(n,t.substring(a,o)),g(n,i[2],i[1]),a=C.lastIndex}ay)return{lines:[],width:0,height:0};E.textWidth=r(E.text,O);var I=P.textWidth,D=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))E.percentWidth=I,c.push(E),I=0;else{if(D){I=E.textWidth;var R=P.textBackgroundColor,B=R&&R.image;B&&(B=m.findExistImage(B),m.isImageReady(B)&&(I=Math.max(I,B.width*A/B.height)))}var L=k?k[1]+k[3]:0;I+=L;var F=null!=v?v-T:null;null!=F&&Fh&&(n*=h/(o=n+r),r*=h/o),i+a>h&&(i*=h/(o=i+a),a*=h/o),r+i>u&&(r*=u/(o=r+i),i*=u/o),n+a>u&&(n*=u/(o=n+a),a*=u/o),t.moveTo(s+n,l),t.lineTo(s+h-r,l),0!==r&&t.arc(s+h-r,l+r,r,-Math.PI/2,0),t.lineTo(s+h,l+u-i),0!==i&&t.arc(s+h-i,l+u-i,i,0,Math.PI/2),t.lineTo(s+a,l+u),0!==a&&t.arc(s+a,l+u-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},function(t,e){var n=2*Math.PI;e.normalizeRadian=function(t){return(t%=n)<0&&(t+=n),t}},function(t,e,n){var r=n(66),i=n(67);e.buildPath=function(t,e,n){var a=e.points,o=e.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=i(a,o,n,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,h=0;h<(n?l:l-1);h++){var u=s[2*h],c=s[2*h+1],f=a[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],f[0],f[1])}}else{"spline"===o&&(a=r(a,n)),t.moveTo(a[0][0],a[0][1]),h=1;for(var d=a.length;hs?(s*=2*t/o,o=2*t):(o*=2*t/s,s=2*t);var l=e?0:M-o/2,h=e?0:P-s/2;return n=r.graphic.makePath(C.slice(7),{},new r.graphic.BoundingRect(l,h,o,s)),e&&(n.position=[-o/2,-s/2]),n}if(k){var u=e?-t[0]:M-t[0],c=e?-t[1]:P-t[1];return a.createSymbol("rect",u,c,2*t[0],2*t[1])}u=e?-t:M-t,c=e?-t:P-t;return"pin"===C?c+=t:"arrow"===C&&(c-=t),a.createSymbol(C,u,c,2*t,2*t)}return new r.graphic.Circle({shape:{cx:e?0:M,cy:e?0:P,r:t}})}function l(){var e=i(b);return e.style.fill=null,e.setStyle(t.getModel("outline.itemStyle").getItemStyle()),e}function h(e,n,a){var l=k?v[0]:v,h=k?y/2:v;console.log(h);var u=f.getItemModel(e),c=u.getModel("itemStyle"),d=u.get("phase"),p=o(u.get("amplitude"),2*h),g=o(u.get("waveLength"),2*l),m=h-f.get("value",e)*h*2;d=a?a.shape.phase:"auto"===d?e*Math.PI/4:d;var x=c.getItemStyle();if(!x.fill){var _=t.get("color"),w=e%_.length;x.fill=_[w]}var b=new s({shape:{waveLength:g,radius:l,radiusY:h,cx:2*l,cy:0,waterLevel:m,amplitude:p,phase:d,inverse:n},style:x,position:[M,P]});b.shape._waterLevel=m;var S=u.getModel("emphasis.itemStyle").getItemStyle();S.lineWidth=0,r.graphic.setHoverStyle(b,S);var T=i(v,!0);return T.setStyle({fill:"white"}),b.setClipPath(T),b}function u(t,e,n){var r=f.getItemModel(t),i=r.get("period"),a=r.get("direction"),o=f.get("value",t),s=r.get("phase");s=n?n.shape.phase:"auto"===s?t*Math.PI/4:s;var l;l="auto"===i?function(e){var n=f.count();return 0===n?e:e*(.2+(n-t)/n*.8)}(5e3):"function"==typeof i?i(o,t):i;var h=0;"right"===a||null==a?h=Math.PI:"left"===a?h=-Math.PI:"none"===a?h=0:console.error("Illegal direction value for liquid fill."),"none"!==a&&r.get("waveAnimation")&&e.animate("shape",!0).when(0,{phase:s}).when(l/2,{phase:h+s}).when(l,{phase:2*h+s}).during(function(){I&&I.dirty(!0)}).start()}var c=this.group;c.removeAll();var f=t.getData(),d=f.getItemModel(0),p=d.get("center"),v=d.get("radius"),g=n.getWidth(),y=n.getHeight(),m=Math.min(g,y),x=0,_=0,w=t.get("outline.show");w&&(x=t.get("outline.borderDistance"),_=o(t.get("outline.itemStyle.borderWidth"),m));var b,S,T,M=o(p[0],g),P=o(p[1],y),k=!1,C=t.get("shape");("container"===C?(k=!0,S=[(b=[g/2,y/2])[0]-_/2,b[1]-_/2],T=[o(x,g),o(x,y)],v=[Math.max(S[0]-T[0],0),Math.max(S[1]-T[1],0)]):(S=(b=o(v,m)/2)-_/2,T=o(x,m),v=Math.max(S-T,0)),w)&&(l().style.lineWidth=_,c.add(l()));var O=k?0:M-v,A=k?0:P-v,I=null;c.add(function(){var e=i(v);e.setStyle(t.getModel("backgroundStyle").getItemStyle()),e.style.fill=null,e.z2=5;var n=i(v);n.setStyle(t.getModel("backgroundStyle").getItemStyle()),n.style.stroke=null;var a=new r.graphic.Group;return a.add(e),a.add(n),a}());var D=this._data,R=[];f.diff(D).add(function(e){var n=h(e,!1),i=n.shape.waterLevel;n.shape.waterLevel=k?y/2:v,r.graphic.initProps(n,{shape:{waterLevel:i}},t),n.z2=2,u(e,n,null),c.add(n),f.setItemGraphicEl(e,n),R.push(n)}).update(function(e,n){for(var i=D.getItemGraphicEl(n),a=h(e,!1,i),o={},s=["amplitude","cx","cy","phase","radius","radiusY","waterLevel","waveLength"],l=0;l=0)&&(r={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=n.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),r}function T(t,e,n,r,i,a){if("function"==typeof i&&(a=i,i=null),r&&r.isAnimationEnabled()){var o=t?"Update":"",s=r.getShallow("animationDuration"+o),l=r.getShallow("animationEasing"+o),h=r.getShallow("animationDelay"+o);"function"==typeof h&&(h=h(i,r.getAnimationDelayParams?r.getAnimationDelayParams(e,i):null)),"function"==typeof s&&(s=s(i)),s>0?e.animateTo(n,s,h||0,l,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function M(t,e,n,r,i){T(!0,t,e,n,r,i)}function P(t,e,n){return e&&!k.isArrayLike(e)&&(e=R.getLocalTransform(e)),n&&(e=A.invert([],e)),I.applyTransform([],t,e)}var k=n(0),C=n(38),O=n(17),A=n(9),I=n(2),D=n(1),R=n(16),B=n(57);e.Image=B;var L=n(58);e.Group=L;var F=n(59);e.Text=F;var E=n(60);e.Circle=E;var W=n(61);e.Sector=W;var z=n(64);e.Ring=z;var N=n(65);e.Polygon=N;var q=n(68);e.Polyline=q;var j=n(69);e.Rect=j;var H=n(70);e.Line=H;var Y=n(71);e.BezierCurve=Y;var U=n(72);e.Arc=U;var V=n(73);e.CompoundPath=V;var G=n(74);e.LinearGradient=G;var X=n(75);e.RadialGradient=X;var Q=n(3);e.BoundingRect=Q;var $=n(76);e.IncrementalDisplayable=$;var Z=Math.round,K=Math.max,J=Math.min,tt={},et=C.mergePath;e.extendShape=function(t){return D.extend(t)},e.extendPath=function(t,e){return C.extendFromString(t,e)},e.makePath=r,e.makeImage=function(t,e,n){var r=new B({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var a={width:t.width,height:t.height};r.setStyle(i(e,a))}}});return r},e.mergePath=et,e.resizePath=a,e.subPixelOptimizeLine=function(t){var e=t.shape,n=t.style.lineWidth;return Z(2*e.x1)===Z(2*e.x2)&&(e.x1=e.x2=o(e.x1,n,!0)),Z(2*e.y1)===Z(2*e.y2)&&(e.y1=e.y2=o(e.y1,n,!0)),t},e.subPixelOptimizeRect=function(t){var e=t.shape,n=t.style.lineWidth,r=e.x,i=e.y,a=e.width,s=e.height;return e.x=o(e.x,n,!0),e.y=o(e.y,n,!0),e.width=Math.max(o(r+a,n,!1)-e.x,0===a?0:1),e.height=Math.max(o(i+s,n,!1)-e.y,0===s?0:1),t},e.subPixelOptimize=o,e.setHoverStyle=function(t,e,n){t.__hoverSilentOnTouch=n&&n.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&p(t,e)}):p(t,e),t.on("mouseover",v).on("mouseout",g),t.on("emphasis",y).on("normal",m)},e.setLabelStyle=function(t,e,n,r,i,a,o){var s,l=(i=i||tt).labelFetcher,h=i.labelDataIndex,u=i.labelDimIndex,c=n.getShallow("show"),f=r.getShallow("show");(c||f)&&(l&&(s=l.getFormattedLabel(h,"normal",null,u)),null==s&&(s=k.isFunction(i.defaultText)?i.defaultText(h,i):i.defaultText));var d=c?s:null,p=f?k.retrieve2(l?l.getFormattedLabel(h,"emphasis",null,u):null,s):null;null==d&&null==p||(x(t,n,a,i),x(e,r,o,i,!0)),t.text=d,e.text=p},e.setTextStyle=x,e.setText=function(t,e,n){var r,i={isRectText:!0};!1===n?r=!0:i.autoColor=n,_(t,e,i,r),t.host&&t.host.dirty&&t.host.dirty(!1)},e.getFont=function(t,e){var n=e||e.getModel("textStyle");return k.trim([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},e.updateProps=M,e.initProps=function(t,e,n,r,i){T(!1,t,e,n,r,i)},e.getTransform=function(t,e){for(var n=A.identity([]);t&&t!==e;)A.mul(n,t.getLocalTransform(),n),t=t.parent;return n},e.applyTransform=P,e.transformDirection=function(t,e,n){var r=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),i=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-r:"right"===t?r:0,"top"===t?-i:"bottom"===t?i:0];return a=P(a,e,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},e.groupTransition=function(t,e,n,r){function i(t){var e={position:I.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=k.extend({},t.shape)),e}if(t&&e){var a=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var r=i(t);t.attr(i(e)),M(t,r,n,t.dataIndex)}}})}},e.clipPointsByRect=function(t,e){return k.map(t,function(t){var n=t[0];n=K(n,e.x),n=J(n,e.x+e.width);var r=t[1];return r=K(r,e.y),[n,r=J(r,e.y+e.height)]})},e.clipRectByRect=function(t,e){var n=K(t.x,e.x),r=J(t.x+t.width,e.x+e.width),i=K(t.y,e.y),a=J(t.y+t.height,e.y+e.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}},e.createIcon=function(t,e,n){var i=(e=k.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),k.defaults(i,n),new B(e)):r(t.replace("path://",""),e,n,"center")}},function(t,e,n){function r(t,e,n,r,i,a,o,s,l,d,g){var y=l*(f/180),m=c(y)*(t-n)/2+u(y)*(e-r)/2,x=-1*u(y)*(t-n)/2+c(y)*(e-r)/2,_=m*m/(o*o)+x*x/(s*s);_>1&&(o*=h(_),s*=h(_));var w=(i===a?-1:1)*h((o*o*(s*s)-o*o*(x*x)-s*s*(m*m))/(o*o*(x*x)+s*s*(m*m)))||0,b=w*o*x/s,S=w*-s*m/o,T=(t+n)/2+c(y)*b-u(y)*S,M=(e+r)/2+u(y)*b+c(y)*S,P=v([1,0],[(m-b)/o,(x-S)/s]),k=[(m-b)/o,(x-S)/s],C=[(-1*m-b)/o,(-1*x-S)/s],O=v(k,C);p(k,C)<=-1&&(O=f),p(k,C)>=1&&(O=0),0===a&&O>0&&(O-=2*f),1===a&&O<0&&(O+=2*f),g.addData(d,T,M,o,s,P,O,y,a)}function i(t,e){var n=function(t){if(!t)return[];var e,n=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===g[0]&&g.shift();for(var y=0;y0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var a=("radial"===e.type?i:r)(t,e,n),o=e.colorStops,s=0;s3&&(e=n.call(e,1));for(var i=this._$handlers[t],a=i.length,o=0;o4&&(e=n.call(e,1,e.length-1));for(var i=e[e.length-1],a=this._$handlers[t],o=a.length,s=0;s0&&this.animate(t,!1).when(null==r?500:r,a).delay(i||0),this}};var f=c;t.exports=f},function(t,e,n){function r(t,e){return t[e]}function i(t,e,n){t[e]=n}function a(t,e,n){return(e-t)*n+t}function o(t,e,n){return n>.5?e:t}function s(t,e,n,r,i){var o=t.length;if(1==i)for(var s=0;si)t.length=i;else for(var a=r;a=0&&!(k[n]<=e);n--);n=Math.min(n,_-2)}else{for(n=N;n<_&&!(k[n]>e);n++);n=Math.min(n-1,_-2)}N=n,q=e;var r=k[n+1]-k[n];if(0!==r)if(L=(e-k[n])/r,x)if(E=C[n],F=C[0===n?n:n-1],W=C[n>_-2?_-1:n+1],z=C[n>_-3?_-1:n+2],S)u(F,E,W,z,L,L*L,L*L*L,p(t,i),P);else{if(T)l=u(F,E,W,z,L,L*L,L*L*L,j,1),l=d(j);else{if(M)return o(E,W,L);l=c(F,E,W,z,L,L*L,L*L*L)}m(t,i,l)}else if(S)s(C[n],C[n+1],L,p(t,i),P);else{var l;if(T)s(C[n],C[n+1],L,j,1),l=d(j);else{if(M)return o(C[n],C[n+1],L);l=a(C[n],C[n+1],L)}m(t,i,l)}},ondestroy:n});return e&&"spline"!==e&&(H.easing=e),H}}}var v=n(44),g=n(17),y=n(0).isArrayLike,m=Array.prototype.slice,x=function(t,e,n,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||r,this._setter=a||i,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};x.prototype={when:function(t,e){var n=this._tracks;for(var r in e)if(e.hasOwnProperty(r)){if(!n[r]){n[r]=[];var i=this._getter(this._target,r);if(null==i)continue;0!==t&&n[r].push({time:0,value:f(i)})}n[r].push({time:t,value:e[r]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t1&&(i=function(){for(var t in arguments)console.log(arguments[t])});var a=i;t.exports=a},function(t,e,n){var r=n(20),i=new(n(3)),a=function(){};a.prototype={constructor:a,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&r.normalizeTextStyle(n,!0);var a=n.text;if(null!=a&&(a+=""),r.needDrawText(a,n)){t.save();var o=this.transform;n.transformText?this.setTransform(t):o&&(i.copy(e),i.applyTransform(o),e=i),r.renderText(this,t,a,n,e),t.restore()}}};var o=a;t.exports=o},function(t,e,n){var r=n(2),i=n(4),a=Math.min,o=Math.max,s=Math.sin,l=Math.cos,h=2*Math.PI,u=r.create(),c=r.create(),f=r.create(),d=[],p=[];e.fromPoints=function(t,e,n){if(0!==t.length){var r,i=t[0],s=i[0],l=i[0],h=i[1],u=i[1];for(r=1;r1e-4)return p[0]=t-n,p[1]=e-i,v[0]=t+n,void(v[1]=e+i);if(u[0]=l(a)*n+t,u[1]=s(a)*i+e,c[0]=l(o)*n+t,c[1]=s(o)*i+e,g(p,u,c),y(v,u,c),(a%=h)<0&&(a+=h),(o%=h)<0&&(o+=h),a>o&&!d?o+=h:aa&&(f[0]=l(_)*n+t,f[1]=s(_)*i+e,g(p,f,p),y(v,f,v))}},function(t,e,n){function r(t,e){return Math.abs(t-e)e&&u>r&&u>o&&u>l||u1&&i(),f=v.cubicAt(e,r,o,l,w[0]),g>1&&(d=v.cubicAt(e,r,o,l,w[1]))),p+=2==g?me&&s>r&&s>a||s=0&&h<=1){for(var u=0,c=v.quadraticAt(e,r,a,h),f=0;fn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);_[0]=-l,_[1]=l;var h=Math.abs(r-i);if(h<1e-4)return 0;if(h%m<1e-4){r=0,i=m;var u=a?1:-1;return o>=_[0]+t&&o<=_[1]+t?u:0}if(a){l=r;r=p(i),i=p(l)}else r=p(r),i=p(i);r>i&&(i+=m);for(var c=0,f=0;f<2;f++){var d=_[f];if(d+t>o){var v=Math.atan2(s,d);u=a?1:-1;v<0&&(v=m+v),(v>=r&&v<=i||v+m>=r&&v+m<=i)&&(v>Math.PI/2&&v<1.5*Math.PI&&(u=-u),c+=u)}}return c}function l(t,e,n,i,l){for(var h=0,p=0,v=0,m=0,x=0,_=0;_1&&(n||(h+=g(p,v,m,x,i,l))),1==_&&(m=p=t[_],x=v=t[_+1]),w){case y.M:p=m=t[_++],v=x=t[_++];break;case y.L:if(n){if(u.containStroke(p,v,t[_],t[_+1],e,i,l))return!0}else h+=g(p,v,t[_],t[_+1],i,l)||0;p=t[_++],v=t[_++];break;case y.C:if(n){if(c.containStroke(p,v,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],e,i,l))return!0}else h+=a(p,v,t[_++],t[_++],t[_++],t[_++],t[_],t[_+1],i,l)||0;p=t[_++],v=t[_++];break;case y.Q:if(n){if(f.containStroke(p,v,t[_++],t[_++],t[_],t[_+1],e,i,l))return!0}else h+=o(p,v,t[_++],t[_++],t[_],t[_+1],i,l)||0;p=t[_++],v=t[_++];break;case y.A:var b=t[_++],S=t[_++],T=t[_++],M=t[_++],P=t[_++],k=t[_++],C=(t[_++],1-t[_++]),O=Math.cos(P)*T+b,A=Math.sin(P)*M+S;_>1?h+=g(p,v,O,A,i,l):(m=O,x=A);var I=(i-b)*M/T+b;if(n){if(d.containStroke(b,S,M,P,P+k,C,e,I,l))return!0}else h+=s(b,S,M,P,P+k,C,I,l);p=Math.cos(P+k)*T+b,v=Math.sin(P+k)*M+S;break;case y.R:m=p=t[_++],x=v=t[_++];O=m+t[_++],A=x+t[_++];if(n){if(u.containStroke(m,x,O,x,e,i,l)||u.containStroke(O,x,O,A,e,i,l)||u.containStroke(O,A,m,A,e,i,l)||u.containStroke(m,A,m,x,e,i,l))return!0}else h+=g(O,x,O,A,i,l),h+=g(m,A,m,x,i,l);break;case y.Z:if(n){if(u.containStroke(p,v,m,x,e,i,l))return!0}else h+=g(p,v,m,x,i,l);p=m,v=x}}return n||r(v,x)||(h+=g(p,v,m,x,i,l)||0),0!==h}var h=n(8),u=n(50),c=n(51),f=n(52),d=n(53),p=n(23).normalizeRadian,v=n(4),g=n(54),y=h.CMD,m=2*Math.PI,x=1e-4,_=[-1,-1,-1],w=[-1,-1];e.contain=function(t,e,n){return l(t,0,!1,e,n)},e.containStroke=function(t,e,n,r){return l(t,e,!0,n,r)}},function(t,e){e.containStroke=function(t,e,n,r,i,a,o){if(0===i)return!1;var s,l=i;if(o>e+l&&o>r+l||ot+l&&a>n+l||ae+f&&c>i+f&&c>o+f&&c>l+f||ct+f&&u>n+f&&u>a+f&&u>s+f||ue+u&&h>i+u&&h>o+u||ht+u&&l>n+u&&l>a+u||ln||f+co&&(o+=i);var p=Math.atan2(u,h);return p<0&&(p+=i),p>=a&&p<=o||p+i>=a&&p+i<=o}},function(t,e){t.exports=function(t,e,n,r,i,a){if(a>e&&a>r||ai?o:0}},function(t,e){var n=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};n.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var r=n;t.exports=r},function(t,e,n){var r=n(8),i=n(2).applyTransform,a=r.CMD,o=[[],[],[]],s=Math.sqrt,l=Math.atan2;t.exports=function(t,e){var n,r,h,u,c,f=t.data,d=a.M,p=a.C,v=a.L,g=a.R,y=a.A,m=a.Q;for(h=0,u=0;h=0&&(n.splice(r,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof o&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,a=r.indexOf(i,t);return a<0?this:(i.splice(a,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof o&&t.delChildrenFromStorage(n)),e&&e.refresh(),this)},removeAll:function(){var t,e,n=this._children,r=this.__storage;for(e=0;e=11?function(){var e,n=this.__clipPaths,r=this.style;if(n)for(var a=0;a=11)}}(navigator.userAgent);t.exports=n},function(t,e,n){var r=n(1).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,r=e.cy,i=2*Math.PI;t.moveTo(n+e.r,r),t.arc(n,r,e.r,0,i,!1),t.moveTo(n+e.r0,r),t.arc(n,r,e.r0,0,i,!0)}});t.exports=r},function(t,e,n){var r=n(1),i=n(24),a=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){i.buildPath(t,e,!0)}});t.exports=a},function(t,e,n){function r(t,e,n,r,i,a,o){var s=.5*(n-t),l=.5*(r-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*i+e}var i=n(2).distance;t.exports=function(t,e){for(var n=t.length,a=[],o=0,s=1;sn-2?n-1:d+1],c=t[d>n-3?n-1:d+2]);var g=p*p,y=p*g;a.push([r(h[0],v[0],u[0],c[0],p,g,y),r(h[1],v[1],u[1],c[1],p,g,y)])}return a}},function(t,e,n){var r=n(2),i=r.min,a=r.max,o=r.scale,s=r.distance,l=r.add,h=r.clone,u=r.sub;t.exports=function(t,e,n,r){var c,f,d,p,v=[],g=[],y=[],m=[];if(r){d=[1/0,1/0],p=[-1/0,-1/0];for(var x=0,_=t.length;x<_;x++)i(d,d,t[x]),a(p,p,t[x]);i(d,d,r[0]),a(p,p,r[1])}for(x=0,_=t.length;x<_;x++){var w=t[x];if(n)c=t[x?x-1:_-1],f=t[(x+1)%_];else{if(0===x||x===_-1){v.push(h(t[x]));continue}c=t[x-1],f=t[x+1]}u(g,f,c),o(g,g,e);var b=s(w,c),S=s(w,f),T=b+S;0!==T&&(b/=T,S/=T),o(y,g,-b),o(m,g,S);var M=l([],w,y),P=l([],w,m);r&&(a(M,M,d),i(M,M,p),a(P,P,d),i(P,P,p)),v.push(M),v.push(P)}return n&&v.push(v.shift()),v}},function(t,e,n){var r=n(1),i=n(24),a=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){i.buildPath(t,e,!1)}});t.exports=a},function(t,e,n){var r=n(1),i=n(22),a=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,r=e.y,a=e.width,o=e.height;e.r?i.buildPath(t,e):t.rect(n,r,a,o),t.closePath()}});t.exports=a},function(t,e,n){var r=n(1).extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(n,r),o<1&&(i=n*(1-o)+i*o,a=r*(1-o)+a*o),t.lineTo(i,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}});t.exports=r},function(t,e,n){function r(t,e,n){var r=t.cpx2,i=t.cpy2;return null===r||null===i?[(n?f:u)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?f:u)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?c:h)(t.x1,t.cpx1,t.x2,e),(n?c:h)(t.y1,t.cpy1,t.y2,e)]}var i=n(1),a=n(2),o=n(4),s=o.quadraticSubdivide,l=o.cubicSubdivide,h=o.quadraticAt,u=o.cubicAt,c=o.quadraticDerivativeAt,f=o.cubicDerivativeAt,d=[],p=i.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=e.cpx1,h=e.cpy1,u=e.cpx2,c=e.cpy2,f=e.percent;0!==f&&(t.moveTo(n,r),null==u||null==c?(f<1&&(s(n,o,i,f,d),o=d[1],i=d[2],s(r,h,a,f,d),h=d[1],a=d[2]),t.quadraticCurveTo(o,h,i,a)):(f<1&&(l(n,o,u,i,f,d),o=d[1],u=d[2],i=d[3],l(r,h,c,a,f,d),h=d[1],c=d[2],a=d[3]),t.bezierCurveTo(o,h,u,c,i,a)))},pointAt:function(t){return r(this.shape,t,!1)},tangentAt:function(t){var e=r(this.shape,t,!0);return a.normalize(e,e)}});t.exports=p},function(t,e,n){var r=n(1).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,r=e.cy,i=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*i+n,h*i+r),t.arc(n,r,i,a,o,!s)}});t.exports=r},function(t,e,n){var r=n(1),i=r.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n0;)e.phase-=2*Math.PI;var i=e.phase/Math.PI/2*e.waveLength,a=e.cx-e.radius+i-2*e.radius;t.moveTo(a,e.waterLevel);for(var o=0,s=0;s 2 | 3 | 4 | Jupyter-Echarts 5 | 6 | 7 | 43 | 44 | 45 | Fork me on GitHub 46 |
47 |
48 | https://pyecharts.github.io/jupyter-echarts

49 | Fork 50 | Star

51 | Enjoy echarts with the github hosting 52 |

53 |
54 | 55 | 56 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jupyter-echarts", 3 | "version": "1.4.3", 4 | "description": "Bring echarts libraries to jupyter notebooks", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "C. W.", 10 | "license": "MIT", 11 | "dependencies": { 12 | "echarts": "4.2.1", 13 | "echarts-gl": "1.1.1", 14 | "echarts-liquidfill": "2.0.4", 15 | "echarts-wordcloud": "1.1.3", 16 | "gulp": "^3.8.0", 17 | "requirejs": "^2.3.4" 18 | }, 19 | "devDependencies": { 20 | "echarts-mapmaker": "^1.0.10", 21 | "gulp-minify": "^1.0.0", 22 | "gulp-rename": "^1.2.2", 23 | "gulp-typescript": "^3.2.1", 24 | "pug": "^2.0.0-rc.4", 25 | "require-dir": "^0.3.2", 26 | "typescript": "^2.4.2" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Jupyter-Echarts 2 | 3 | It integrates echarts to jupyter notebook as nbextensions and echarts libraries will be served from http://localhost:8888/nbextensions/echarts/. 4 | 5 | 6 | No action is required from pyecharts users. It is auto-installed in [pyecharts](https://github.com/pyecharts/pyecharts) v0.3.2+ and was embedded in [pyecharts](https://github.com/pyecharts/pyecharts) v0.1.9.5+. 7 | 8 | ## Content 9 | 10 | 1. echarts 11 | 1. echarts-gl 12 | 1. echarts-liquidfill 13 | 1. echarts-wordcloud 14 | 15 | ## Installation to jupyter 16 | 17 | ```shell 18 | jupyter nbextension install echarts 19 | jupyter nbextension enable echarts/main 20 | ``` 21 | 22 | ## Alternative usage 23 | 24 | For github hosted files, please use `https://pyecharts.github.io/jupyter-echarts/` prefix, put the folder name `echarts` and place the actual javascript file name. For example, the url for a github hosted `echarts.min.js` is https://pyecharts.github.io/jupyter-echarts/echarts/echarts.min.js. 25 | 26 | ### Example 27 | 28 | ``` 29 | 30 | 31 | 32 | 38 | 39 | 40 | 41 | 42 |
43 | 44 | 47 | 48 | 49 | ``` 50 | 51 | ![Usage with echarts](https://echarts-maps.github.io/echarts-china-cities-js/nanchang.png) 52 | 53 | ## Development 54 | 55 | Please get all depdencies 56 | 57 | ```shell 58 | npm install -g gulp 59 | npm install 60 | ``` 61 | 62 | Then build 63 | 64 | ```shell 65 | gulp 66 | ``` 67 | 68 | You will then obtain all echarts libraries in echarts folder. 69 | 70 | 71 | ## License 72 | 73 | This bundling code is MIT license 74 | The echarts libraries are under BSD-3 license of Baidu Inc. 75 | -------------------------------------------------------------------------------- /registry.json: -------------------------------------------------------------------------------- 1 | { 2 | "FILE_MAP": { 3 | "echarts": "echarts.min", 4 | "echartsgl": "echarts-gl.min", 5 | "liquidfill": "echarts-liquidfill.min", 6 | "wordcloud": "echarts-wordcloud.min" 7 | }, 8 | "PINYIN_MAP": {}, 9 | "JUPYTER_URL": "/nbextensions/echarts", 10 | "JUPYTER_ENTRY": "echarts/main", 11 | "JS_FOLDER": "echarts", 12 | "GITHUB_URL": "https://pyecharts.github.io/jupyter-echarts/echarts" 13 | } -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | var version = '1.4.0'; 2 | 3 | export function load_ipython_extension() { 4 | console.log("jupyter-echarts " + version + " (echarts 4.0.4) has been loaded"); 5 | } 6 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "src/main.ts" 4 | ], 5 | "compilerOptions": { 6 | "noImplicitAny": true, 7 | "target": "es5", 8 | "module": "amd" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyecharts/jupyter-echarts/74e1aade36a97ad8c6c70560f3af5dfb7bead6df/wallpaper.jpg --------------------------------------------------------------------------------