提交 ffde2339 编写于 作者: 1 100pah

release: 5.0.0-alpha.1

上级 165e1479
此差异已折叠。
因为 它太大了无法显示 source diff 。你可以改为 查看blob
此差异已折叠。
此差异已折叠。
此差异已折叠。
因为 它太大了无法显示 source diff 。你可以改为 查看blob
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -19,4 +19,4 @@
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],e):e(t.bmap={},t.echarts)}(this,function(t,o){"use strict";function l(t,e){this._bmap=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=e,this._projection=new BMap.MercatorProjection}function n(i,a){return a=a||[0,0],o.util.map([0,1],function(t){var e=a[t],o=i[t]/2,n=[],r=[];return n[t]=e-o,r[t]=e+o,n[1-t]=r[1-t]=a[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(r)[t])},this)}var d;l.prototype.dimensions=["lng","lat"],l.prototype.setZoom=function(t){this._zoom=t},l.prototype.setCenter=function(t){this._center=this._projection.lngLatToPoint(new BMap.Point(t[0],t[1]))},l.prototype.setMapOffset=function(t){this._mapOffset=t},l.prototype.getBMap=function(){return this._bmap},l.prototype.dataToPoint=function(t){var e=new BMap.Point(t[0],t[1]),o=this._bmap.pointToOverlayPixel(e),n=this._mapOffset;return[o.x-n[0],o.y-n[1]]},l.prototype.pointToData=function(t){var e=this._mapOffset;return[(t=this._bmap.overlayPixelToPoint({x:t[0]+e[0],y:t[1]+e[1]})).lng,t.lat]},l.prototype.getViewRect=function(){var t=this._api;return new o.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},l.prototype.getRoamTransform=function(){return o.matrix.create()},l.prototype.prepareCustoms=function(t){var e=this.getViewRect();return{coordSys:{type:"bmap",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:o.util.bind(this.dataToPoint,this),size:o.util.bind(n,this)}}},l.dimensions=l.prototype.dimensions,l.create=function(t,c){var m,f=c.getDom();t.eachComponent("bmap",function(t){var e=c.getZr().painter,o=e.getViewportRoot();if("undefined"==typeof BMap)throw new Error("BMap api is not loaded");if(d=d||function(){function t(t){this._root=t}return(t.prototype=new BMap.Overlay).initialize=function(t){return t.getPanes().labelPane.appendChild(this._root),this._root},t.prototype.draw=function(){},t}(),m)throw new Error("Only one bmap component can exist");if(!t.__bmap){var n=f.querySelector(".ec-extension-bmap");n&&(o.style.left="0px",o.style.top="0px",f.removeChild(n)),(n=document.createElement("div")).style.cssText="width:100%;height:100%",n.classList.add("ec-extension-bmap"),f.appendChild(n);var r=t.__bmap=new BMap.Map(n),i=new d(o);r.addOverlay(i),e.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}}r=t.__bmap;var a=t.get("center"),p=t.get("zoom");if(a&&p){var s=new BMap.Point(a[0],a[1]);r.centerAndZoom(s,p)}(m=new l(r,c)).setMapOffset(t.__mapOffset||[0,0]),m.setZoom(p),m.setCenter(a),t.coordinateSystem=m}),t.eachSeries(function(t){"bmap"===t.get("coordinateSystem")&&(t.coordinateSystem=m)})},o.extendComponentModel({type:"bmap",getBMap:function(){return this.__bmap},setCenterAndZoom:function(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged:function(t,e){var o=this.option;return!(function(t,e){return t&&e&&t[0]===e[0]&&t[1]===e[1]}(t,o.center)&&e===o.zoom)},defaultOption:{center:[104.114129,37.550339],zoom:5,mapStyle:{},mapStyleV2:{},roam:!1}});var p={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},s={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},c=Object.prototype.toString;function h(t){if(null==t||"object"!=typeof t)return t;var e=t,o=c.call(t);if("[object Array]"===o){if(!m(t)){e=[];for(var n=0,r=t.length;n<r;n++)e[n]=h(t[n])}}else if(s[o]){if(!m(t)){var i=t.constructor;if(t.constructor.from)e=i.from(t);else{e=new i(t.length);for(n=0,r=t.length;n<r;n++)e[n]=h(t[n])}}}else if(!p[o]&&!m(t)&&!function(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}(t))for(var a in e={},t)t.hasOwnProperty(a)&&(e[a]=h(t[a]));return e}var e="__ec_primitive__";function m(t){return t[e]}o.extendComponentView({type:"bmap",render:function(r,t,i){function e(t,e){if(!a){var o=p.parentNode.parentNode.parentNode,n=[-parseInt(o.style.left,10)||0,-parseInt(o.style.top,10)||0];p.style.left=n[0]+"px",p.style.top=n[1]+"px",s.setMapOffset(n),r.__mapOffset=n,i.dispatchAction({type:"bmapRoam"})}}var a=!0,o=r.getBMap(),p=i.getZr().painter.getViewportRoot(),s=r.coordinateSystem;function n(){a||i.dispatchAction({type:"bmapRoam"})}o.removeEventListener("moving",this._oldMoveHandler),o.removeEventListener("zoomend",this._oldZoomEndHandler),o.addEventListener("moving",e),o.addEventListener("zoomend",n),this._oldMoveHandler=e,this._oldZoomEndHandler=n;var c=r.get("roam");c&&"scale"!==c?o.enableDragging():o.disableDragging(),c&&"move"!==c?(o.enableScrollWheelZoom(),o.enableDoubleClickZoom(),o.enablePinchToZoom()):(o.disableScrollWheelZoom(),o.disableDoubleClickZoom(),o.disablePinchToZoom());var m=r.__mapStyle,f=r.get("mapStyle")||{},l=JSON.stringify(f);JSON.stringify(m)!==l&&(Object.keys(f).length&&o.setMapStyle(h(f)),r.__mapStyle=JSON.parse(l));var d=r.__mapStyle2,y=r.get("mapStyleV2")||{},u=JSON.stringify(y);JSON.stringify(d)!==u&&(Object.keys(y).length&&o.setMapStyleV2(h(y)),r.__mapStyle2=JSON.parse(u)),a=!1}}),o.registerCoordinateSystem("bmap",l),o.registerAction({type:"bmapRoam",event:"bmapRoam",update:"updateLayout"},function(t,e){e.eachComponent("bmap",function(t){var e=t.getBMap(),o=e.getCenter();t.setCenterAndZoom([o.lng,o.lat],e.getZoom())})});t.version="1.0.0"});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],e):e((t=t||self).bmap={},t.echarts)}(this,function(t,e){"use strict";function d(t,e){this._bmap=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=e,this._projection=new BMap.MercatorProjection}function o(i,a){return a=a||[0,0],e.util.map([0,1],function(t){var e=a[t],o=i[t]/2,n=[],r=[];return n[t]=e-o,r[t]=e+o,n[1-t]=r[1-t]=a[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(r)[t])},this)}var y;d.prototype.dimensions=["lng","lat"],d.prototype.setZoom=function(t){this._zoom=t},d.prototype.setCenter=function(t){this._center=this._projection.lngLatToPoint(new BMap.Point(t[0],t[1]))},d.prototype.setMapOffset=function(t){this._mapOffset=t},d.prototype.getBMap=function(){return this._bmap},d.prototype.dataToPoint=function(t){var e=new BMap.Point(t[0],t[1]),o=this._bmap.pointToOverlayPixel(e),n=this._mapOffset;return[o.x-n[0],o.y-n[1]]},d.prototype.pointToData=function(t){var e=this._mapOffset;return[(t=this._bmap.overlayPixelToPoint({x:t[0]+e[0],y:t[1]+e[1]})).lng,t.lat]},d.prototype.getViewRect=function(){var t=this._api;return new e.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},d.prototype.getRoamTransform=function(){return e.matrix.create()},d.prototype.prepareCustoms=function(){var t=this.getViewRect();return{coordSys:{type:"bmap",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:e.util.bind(this.dataToPoint,this),size:e.util.bind(o,this)}}},d.dimensions=d.prototype.dimensions,d.create=function(t,l){var m,f=l.getDom();t.eachComponent("bmap",function(t){var e,o,n,r=l.getZr().painter,i=r.getViewportRoot();if("undefined"==typeof BMap)throw new Error("BMap api is not loaded");function a(t){this._root=t}if(y=y||((a.prototype=new BMap.Overlay).initialize=function(t){return t.getPanes().labelPane.appendChild(this._root),this._root},a.prototype.draw=function(){},a),m)throw new Error("Only one bmap component can exist");t.__bmap||((o=f.querySelector(".ec-extension-bmap"))&&(i.style.left="0px",i.style.top="0px",f.removeChild(o)),(o=document.createElement("div")).style.cssText="width:100%;height:100%",o.classList.add("ec-extension-bmap"),f.appendChild(o),e=t.__bmap=new BMap.Map(o),n=new y(i),e.addOverlay(n),r.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}),e=t.__bmap;var p,s=t.get("center"),c=t.get("zoom");s&&c&&(p=new BMap.Point(s[0],s[1]),e.centerAndZoom(p,c)),(m=new d(e,l)).setMapOffset(t.__mapOffset||[0,0]),m.setZoom(c),m.setCenter(s),t.coordinateSystem=m}),t.eachSeries(function(t){"bmap"===t.get("coordinateSystem")&&(t.coordinateSystem=m)})},e.extendComponentModel({type:"bmap",getBMap:function(){return this.__bmap},setCenterAndZoom:function(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged:function(t,e){var o,n,r=this.option;return o=t,n=r.center,!(o&&n&&o[0]===n[0]&&o[1]===n[1]&&e===r.zoom)},defaultOption:{center:[104.114129,37.550339],zoom:5,mapStyle:{},mapStyleV2:{},roam:!1}});var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},c={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},l=Object.prototype.toString,n=Array.prototype.slice,r=function(){}.constructor,i=r?r.prototype:null;function h(t){if(null==t||"object"!=typeof t)return t;var e,o=t,n=l.call(t);if("[object Array]"===n){if(!m(t)){o=[];for(var r=0,i=t.length;r<i;r++)o[r]=h(t[r])}}else if(c[n]){if(!m(t)){var a=t.constructor;if(a.from)o=a.from(t);else{o=new a(t.length);for(r=0,i=t.length;r<i;r++)o[r]=h(t[r])}}}else if(!s[n]&&!m(t)&&("object"!=typeof(e=t)||"number"!=typeof e.nodeType||"object"!=typeof e.ownerDocument))for(var p in o={},t)t.hasOwnProperty(p)&&(o[p]=h(t[p]));return o}i&&"function"==typeof i.bind&&i.call.bind(i.bind);var a="__ec_primitive__";function m(t){return t[a]}e.extendComponentView({type:"bmap",render:function(r,t,i){function e(t,e){var o,n;a||(o=p.parentNode.parentNode.parentNode,n=[-parseInt(o.style.left,10)||0,-parseInt(o.style.top,10)||0],p.style.left=n[0]+"px",p.style.top=n[1]+"px",s.setMapOffset(n),r.__mapOffset=n,i.dispatchAction({type:"bmapRoam"}))}var a=!0,o=r.getBMap(),p=i.getZr().painter.getViewportRoot(),s=r.coordinateSystem;function n(){a||i.dispatchAction({type:"bmapRoam"})}o.removeEventListener("moving",this._oldMoveHandler),o.removeEventListener("zoomend",this._oldZoomEndHandler),o.addEventListener("moving",e),o.addEventListener("zoomend",n),this._oldMoveHandler=e,this._oldZoomEndHandler=n;var c=r.get("roam");c&&"scale"!==c?o.enableDragging():o.disableDragging(),c&&"move"!==c?(o.enableScrollWheelZoom(),o.enableDoubleClickZoom(),o.enablePinchToZoom()):(o.disableScrollWheelZoom(),o.disableDoubleClickZoom(),o.disablePinchToZoom());var l=r.__mapStyle,m=r.get("mapStyle")||{},f=JSON.stringify(m);JSON.stringify(l)!==f&&(Object.keys(m).length&&o.setMapStyle(h(m)),r.__mapStyle=JSON.parse(f));var d=r.__mapStyle2,y=r.get("mapStyleV2")||{},u=JSON.stringify(y);JSON.stringify(d)!==u&&(Object.keys(y).length&&o.setMapStyleV2(h(y)),r.__mapStyle2=JSON.parse(u)),a=!1}}),e.registerCoordinateSystem("bmap",d),e.registerAction({type:"bmapRoam",event:"bmapRoam",update:"updateLayout"},function(t,e){e.eachComponent("bmap",function(t){var e=t.getBMap(),o=e.getCenter();t.setCenterAndZoom([o.lng,o.lat],e.getZoom())})});t.version="1.0.0",Object.defineProperty(t,"__esModule",{value:!0})});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
......@@ -19,4 +19,4 @@
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],t):t(e.dataTool={},e.echarts)}(this,function(e,t){"use strict";var i=Array.prototype.map;function l(e,t,r){if(e&&t){if(e.map&&e.map===i)return e.map(t,r);for(var a=[],o=0,n=e.length;o<n;o++)a.push(t.call(r,e[o],o,e));return a}}function v(e,t){return e.getAttribute(t)}function d(e,t){for(var r=e.firstChild;r;){if(1===r.nodeType&&r.nodeName.toLowerCase()===t.toLowerCase())return r;r=r.nextSibling}return null}function g(e,t){for(var r=e.firstChild,a=[];r;)r.nodeName.toLowerCase()===t.toLowerCase()&&a.push(r),r=r.nextSibling;return a}var r=(Object.freeze||Object)({parse:function(e){var t;if(!(t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e)||t.getElementsByTagName("parsererror").length)return null;var r=d(t,"gexf");if(!r)return null;for(var a=d(r,"graph"),o=function(e){return e?l(g(e,"attribute"),function(e){return{id:v(e,"id"),title:v(e,"title"),type:v(e,"type")}}):[]}(d(a,"attributes")),n={},i=0;i<o.length;i++)n[o[i].id]=o[i];return{nodes:function(e,p){return e?l(g(e,"node"),function(e){var t={id:v(e,"id"),name:v(e,"label"),itemStyle:{normal:{}}},r=d(e,"viz:size"),a=d(e,"viz:position"),o=d(e,"viz:color"),n=d(e,"attvalues");if(r&&(t.symbolSize=parseFloat(v(r,"value"))),a&&(t.x=parseFloat(v(a,"x")),t.y=parseFloat(v(a,"y"))),o&&(t.itemStyle.normal.color="rgb("+[0|v(o,"r"),0|v(o,"g"),0|v(o,"b")].join(",")+")"),n){var i=g(n,"attvalue");t.attributes={};for(var l=0;l<i.length;l++){var u=i[l],s=v(u,"for"),f=v(u,"value"),c=p[s];if(c){switch(c.type){case"integer":case"long":f=parseInt(f,10);break;case"float":case"double":f=parseFloat(f);break;case"boolean":f="true"===f.toLowerCase()}t.attributes[s]=f}}}return t}):[]}(d(a,"nodes"),n),links:function(e){return e?l(g(e,"edge"),function(e){var t={id:v(e,"id"),name:v(e,"label"),source:v(e,"source"),target:v(e,"target"),lineStyle:{normal:{}}},r=t.lineStyle.normal,a=d(e,"viz:thickness"),o=d(e,"viz:color");return a&&(r.width=parseFloat(a.getAttribute("value"))),o&&(r.color="rgb("+[0|v(o,"r"),0|v(o,"g"),0|v(o,"b")].join(",")+")"),t}):[]}(d(a,"edges"))}}});function w(e,t){var r=(e.length-1)*t+1,a=Math.floor(r),o=+e[a-1],n=r-a;return n?o+n*(e[a]-o):o}function a(e,t){for(var r,a=[],o=[],n=[],i=(t=t||[]).boundIQR,l="none"===i||0===i,u=0;u<e.length;u++){n.push(u+"");var s=((r=e[u].slice()).sort(function(e,t){return e-t}),r),f=w(s,.25),c=w(s,.5),p=w(s,.75),v=s[0],d=s[s.length-1],g=(null==i?1.5:i)*(p-f),h=l?v:Math.max(v,f-g),b=l?d:Math.min(d,p+g);a.push([h,f,c,p,b]);for(var m=0;m<s.length;m++){var y=s[m];if(y<h||b<y){var x=[u,y];"vertical"===t.layout&&x.reverse(),o.push(x)}}}return{boxData:a,outliers:o,axisData:n}}var o="1.0.0";t.dataTool&&(t.dataTool.version=o,t.dataTool.gexf=r,t.dataTool.prepareBoxplotData=a),e.version=o,e.gexf=r,e.prepareBoxplotData=a});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],t):t((e=e||self).dataTool={},e.echarts)}(this,function(e,t){"use strict";var r=Array.prototype,i=r.slice,l=r.map,o=function(){}.constructor,a=o?o.prototype:null;function f(e,t,r){if(!e)return[];if(!t)return function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return i.apply(e,t)}(e);if(e.map&&e.map===l)return e.map(t,r);for(var o=[],a=0,n=e.length;a<n;a++)o.push(t.call(r,e[a],a,e));return o}a&&"function"==typeof a.bind&&a.call.bind(a.bind);function d(e,t){return e.getAttribute(t)}function v(e,t){for(var r=e.firstChild;r;){if(1===r.nodeType&&r.nodeName.toLowerCase()===t.toLowerCase())return r;r=r.nextSibling}return null}function g(e,t){for(var r=e.firstChild,o=[];r;)r.nodeName.toLowerCase()===t.toLowerCase()&&o.push(r),r=r.nextSibling;return o}var n=Object.freeze({__proto__:null,parse:function(e){var t;if(!(t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e)||t.getElementsByTagName("parsererror").length)return null;var r=v(t,"gexf");if(!r)return null;for(var o,a,n,c,i=v(r,"graph"),l=(o=v(i,"attributes"))?f(g(o,"attribute"),function(e){return{id:d(e,"id"),title:d(e,"title"),type:d(e,"type")}}):[],u={},s=0;s<l.length;s++)u[l[s].id]=l[s];return{nodes:(n=v(i,"nodes"),c=u,n?f(g(n,"node"),function(e){var t={id:d(e,"id"),name:d(e,"label"),itemStyle:{normal:{}}},r=v(e,"viz:size"),o=v(e,"viz:position"),a=v(e,"viz:color"),n=v(e,"attvalues");if(r&&(t.symbolSize=parseFloat(d(r,"value"))),o&&(t.x=parseFloat(d(o,"x")),t.y=parseFloat(d(o,"y"))),a&&(t.itemStyle.normal.color="rgb("+[0|d(a,"r"),0|d(a,"g"),0|d(a,"b")].join(",")+")"),n){var i=g(n,"attvalue");t.attributes={};for(var l=0;l<i.length;l++){var u=i[l],s=d(u,"for"),f=d(u,"value"),p=c[s];if(p){switch(p.type){case"integer":case"long":f=parseInt(f,10);break;case"float":case"double":f=parseFloat(f);break;case"boolean":f="true"===f.toLowerCase()}t.attributes[s]=f}}}return t}):[]),links:(a=v(i,"edges"))?f(g(a,"edge"),function(e){var t={id:d(e,"id"),name:d(e,"label"),source:d(e,"source"),target:d(e,"target"),lineStyle:{normal:{}}},r=t.lineStyle.normal,o=v(e,"viz:thickness"),a=v(e,"viz:color");return o&&(r.width=parseFloat(o.getAttribute("value"))),a&&(r.color="rgb("+[0|d(a,"r"),0|d(a,"g"),0|d(a,"b")].join(",")+")"),t}):[]}}});function w(e,t){var r=(e.length-1)*t+1,o=Math.floor(r),a=+e[o-1],n=r-o;return n?a+n*(e[o]-a):a}function u(e,t){for(var r,o=[],a=[],n=[],i=(t=t||{}).boundIQR,l="none"===i||0===i,u=0;u<e.length;u++){n.push(u+"");var s=((r=e[u].slice()).sort(function(e,t){return e-t}),r),f=w(s,.25),p=w(s,.5),c=w(s,.75),d=s[0],v=s[s.length-1],g=(null==i?1.5:i)*(c-f),b=l?d:Math.max(d,f-g),h=l?v:Math.min(v,c+g);o.push([b,f,p,c,h]);for(var m=0;m<s.length;m++){var y,x=s[m];(x<b||h<x)&&(y=[u,x],"vertical"===t.layout&&y.reverse(),a.push(y))}}return{boxData:o,outliers:a,axisData:n}}var s="1.0.0";t.dataTool&&(t.dataTool.version=s,t.dataTool.gexf=n,t.dataTool.prepareBoxplotData=u),e.gexf=n,e.prepareBoxplotData=u,e.version=s,Object.defineProperty(e,"__esModule",{value:!0})});
\ No newline at end of file
{
"name": "echarts",
"version": "4.8.0",
"version": "5.0.0-alpha.1",
"description": "A powerful charting and visualization library for browser",
"license": "Apache-2.0",
"keywords": [
......@@ -33,7 +33,7 @@
"lint:dist": "echo 'It might take a while. Please wait ...' && ./node_modules/.bin/jshint --config .jshintrc-dist dist/echarts.js"
},
"dependencies": {
"zrender": "4.3.1"
"zrender": "5.0.0-alpha.1"
},
"devDependencies": {
"@babel/core": "7.3.4",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册