1 line
85 KiB
JavaScript
1 line
85 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["member/common/vendor"],{5752:function(t,e,i){"use strict";(function(t,e){var a=i("3b2d"),o={yAxisWidth:15,yAxisSplit:5,xAxisHeight:15,xAxisLineHeight:15,legendHeight:15,yAxisTitleWidth:15,padding:[10,10,10,10],pixelRatio:1,rotate:!1,columePadding:3,fontSize:13,dataPointShape:["circle","circle","circle","circle"],colors:["#1890ff","#2fc25b","#facc14","#f04864","#8543e0","#90ed7d"],pieChartLinePadding:15,pieChartTextPadding:5,xAxisTextPadding:3,titleColor:"#333333",titleFontSize:20,subtitleColor:"#999999",subtitleFontSize:15,toolTipPadding:3,toolTipBackground:"#000000",toolTipOpacity:.7,toolTipLineHeight:20,radarLabelTextMargin:15,gaugeLabelTextMargin:15},r=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];function o(t,e){for(var i in e)t[i]=t[i]&&"[object Object]"===t[i].toString()?o(t[i],e[i]):t[i]=e[i];return t}if(null==t)throw new TypeError("Cannot convert undefined or null to object");return!i||0>=i.length||i.forEach((function(e){t=o(t,e)})),t},n={toFixed:function(t,e){return e=e||2,this.isFloat(t)&&(t=t.toFixed(e)),t},isFloat:function(t){return 0!=t%1},approximatelyEqual:function(t,e){return 1e-10>Math.abs(t-e)},isSameSign:function(t,e){var i=Math.abs;return i(t)===t&&i(e)===e||i(t)!==t&&i(e)!==e},isSameXCoordinateArea:function(t,e){return this.isSameSign(t.x,e.x)},isCollision:function(t,e){t.end={},t.end.x=t.start.x+t.width,t.end.y=t.start.y-t.height,e.end={},e.end.x=e.start.x+e.width,e.end.y=e.start.y-e.height;var i=e.start.x>t.end.x||e.end.x<t.start.x||e.end.y>t.start.y||e.start.y<t.end.y;return!i}};function l(t,e){var i=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,a){return e+e+i+i+a+a})),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i),o=parseInt(a[1],16),r=parseInt(a[2],16),n=parseInt(a[3],16);return"rgba("+o+","+r+","+n+","+e+")"}function s(t,e,i){if(isNaN(t))throw new Error("[uCharts] unvalid series data!");i=i||10,e=e||"upper";for(var a=1;1>i;)i*=10,a*=10;for(t="upper"===e?Math.ceil(t*a):Math.floor(t*a);0!=t%i;)"upper"===e?t++:t--;return t/a}function h(t,e,i){function a(t){for(;0>t;)t+=2*o;for(;t>2*o;)t-=2*o;return t}var o=Math.PI;return t=a(t),e=a(e),i=a(i),e>i&&(i+=2*o,t<e&&(t+=2*o)),t>=e&&t<=i}function c(t,e){function i(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].y>=r(t[e-1].y,t[e+1].y)||t[e].y<=o(t[e-1].y,t[e+1].y))}function a(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].x>=r(t[e-1].x,t[e+1].x)||t[e].x<=o(t[e-1].x,t[e+1].x))}var o=Math.min,r=Math.max,n=.2,l=.2,s=null,h=null,c=null,d=null;if(1>e?(s=t[0].x+(t[1].x-t[0].x)*n,h=t[0].y+(t[1].y-t[0].y)*n):(s=t[e].x+(t[e+1].x-t[e-1].x)*n,h=t[e].y+(t[e+1].y-t[e-1].y)*n),e>t.length-3){var x=t.length-1;c=t[x].x-(t[x].x-t[x-1].x)*l,d=t[x].y-(t[x].y-t[x-1].y)*l}else c=t[e+1].x-(t[e+2].x-t[e].x)*l,d=t[e+1].y-(t[e+2].y-t[e].y)*l;return i(t,e+1)&&(d=t[e+1].y),i(t,e)&&(h=t[e].y),a(t,e+1)&&(c=t[e+1].x),a(t,e)&&(s=t[e].x),(h>=r(t[e].y,t[e+1].y)||h<=o(t[e].y,t[e+1].y))&&(h=t[e].y),(d>=r(t[e].y,t[e+1].y)||d<=o(t[e].y,t[e+1].y))&&(d=t[e+1].y),(s>=r(t[e].x,t[e+1].x)||s<=o(t[e].x,t[e+1].x))&&(s=t[e].x),(c>=r(t[e].x,t[e+1].x)||c<=o(t[e].x,t[e+1].x))&&(c=t[e+1].x),{ctrA:{x:s,y:h},ctrB:{x:c,y:d}}}function d(t,e,i){return{x:i.x+t,y:i.y-e}}function x(t,e){if(e)for(;n.isCollision(t,e);)0<t.start.x?t.start.y--:0>t.start.x||0<t.start.y?t.start.y++:t.start.y--;return t}function p(t,e,i){var a=0;return t.map((function(t){if(t.color||(t.color=i.colors[a],a=(a+1)%i.colors.length),t.index||(t.index=0),t.type||(t.type=e.type),"undefined"==typeof t.show&&(t.show=!0),t.type||(t.type=e.type),t.pointShape||(t.pointShape="circle"),!t.legendShape)switch(t.type){case"line":t.legendShape="line";break;case"column":t.legendShape="rect";break;case"area":t.legendShape="triangle";break;default:t.legendShape="circle"}return t}))}function g(t,e){var i,a=e-t;return i=1e4<=a?1e3:1e3<=a?100:100<=a?10:10<=a?5:1<=a?1:.1<=a?.1:.01<=a?.01:.001<=a?.001:1e-4<=a?1e-4:1e-5<=a?1e-5:1e-6,{minRange:s(t,"lower",i),maxRange:s(e,"upper",i)}}function f(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:o.fontSize;t+="";t=t.split("");for(var i,a=0,r=0;r<t.length;r++)i=t[r],a+=/[a-zA-Z]/.test(i)?7:/[0-9]/.test(i)?5.5:/\./.test(i)?2.7:/-/.test(i)?3.25:/[\u4e00-\u9fa5]/.test(i)?10:/\(|\)/.test(i)?3.73:/\s/.test(i)?2.5:/%/.test(i)?8:10;return a*e/10}function u(t){return t.reduce((function(t,e){return(t.data?t.data:t).concat(e.data)}),[])}function y(t,e){for(var i=Array(e),a=0;a<i.length;a++)i[a]=0;for(var o=0;o<t.length;o++)for(a=0;a<i.length;a++)i[a]+=t[o].data[a];return t.reduce((function(t,e){return(t.data?t.data:t).concat(e.data).concat(i)}),[])}function v(t,e,i){var a,o;return t.clientX?e.rotate?(o=e.height-t.clientX*e.pixelRatio,a=(t.pageY-i.currentTarget.offsetTop-e.height/e.pixelRatio/2*(e.pixelRatio-1))*e.pixelRatio):(a=t.clientX*e.pixelRatio,o=(t.pageY-i.currentTarget.offsetTop-e.height/e.pixelRatio/2*(e.pixelRatio-1))*e.pixelRatio):e.rotate?(o=e.height-t.x*e.pixelRatio,a=t.y*e.pixelRatio):(a=t.x*e.pixelRatio,o=t.y*e.pixelRatio),{x:a,y:o}}function m(t,e){for(var i,a=[],o=0;o<t.length;o++)if(i=t[o],null!==i.data[e]&&"undefined"!=typeof i.data[e]&&i.show){var r={};r.color=i.color,r.type=i.type,r.style=i.style,r.pointShape=i.pointShape,r.disableLegend=i.disableLegend,r.name=i.name,r.show=i.show,r.data=i.format?i.format(i.data[e]):i.data[e],a.push(r)}return a}function b(t){var e=t.map((function(t){return f(t)}));return Math.max.apply(null,e)}function A(t){for(var e=Math.PI,i=[],a=0;a<t;a++)i.push(2*e/t*a);return i.map((function(t){return-1*t+e/2}))}function S(t,e,i,a){for(var o,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},n=t.map((function(t){var e;return e=a||t.data,{text:r.format?r.format(t,e[i]):t.name+": "+t.data,color:t.color}})),l=[],s={x:0,y:0},h=0;h<e.length;h++)o=e[h],"undefined"!=typeof o[i]&&null!==o[i]&&l.push(o[i]);for(var c,d=0;d<l.length;d++)c=l[d],s.x=Math.round(c.x),s.y+=c.y;return s.y/=l.length,{textList:n,offset:s}}function T(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},r=t.map((function(t){return{text:o.format?o.format(t,a[i]):t.name+": "+t.data,color:t.color,disableLegend:!!t.disableLegend}}));r=r.filter((function(t){if(!0!==t.disableLegend)return t}));for(var n,l=[],s={x:0,y:0},h=0;h<e.length;h++)n=e[h],"undefined"!=typeof n[i]&&null!==n[i]&&l.push(n[i]);for(var c,d=0;d<l.length;d++)c=l[d],s.x=Math.round(c.x),s.y+=c.y;return s.y/=l.length,{textList:r,offset:s}}function P(t,e,i,a,o,r){var n=r.color.upFill,l=r.color.downFill,s=[n,n,l,n],h=[],c={text:o[a],color:null};h.push(c),e.map((function(e){0==a&&0>e.data[1]-e.data[0]?s[1]=l:(e.data[0]<t[a-1][1]&&(s[0]=l),e.data[1]<e.data[0]&&(s[1]=l),e.data[2]>t[a-1][1]&&(s[2]=n),e.data[3]<t[a-1][1]&&(s[3]=l));var i={text:"开盘:"+e.data[0],color:s[0]},o={text:"收盘:"+e.data[1],color:s[1]},r={text:"最低:"+e.data[2],color:s[2]},c={text:"最高:"+e.data[3],color:s[3]};h.push(i,o,r,c)}));for(var d,x=[],p={x:0,y:0},g=0;g<i.length;g++)d=i[g],"undefined"!=typeof d[a]&&null!==d[a]&&x.push(d[a]);return p.x=Math.round(x[0][0].x),{textList:h,offset:p}}function w(t,e){return t.x<=e.width-e.area[1]+10&&t.x>=e.area[3]-10&&t.y>=e.area[0]&&t.y<=e.height-e.area[2]}function _(t,e,i){var a=Math.pow;return a(t.x-e.x,2)+a(t.y-e.y,2)<=a(i,2)}function L(t){var e=[],i=[];return t.forEach((function(t){null===t?(i.length&&e.push(i),i=[]):i.push(t)})),i.length&&e.push(i),e}function F(t,e,i,a){var o={angle:0,xAxisHeight:i.xAxisHeight},r=t.map((function(t){return f(t,e.xAxis.fontSize||i.fontSize)})),n=Math.max.apply(this,r);return 1==e.xAxis.rotateLabel&&n+2*i.xAxisTextPadding>a&&(o.angle=45*Math.PI/180,o.xAxisHeight=2*i.xAxisTextPadding+n*Math.sin(o.angle)),o}function D(t,e,i){var o={angle:0,xAxisHeight:i.xAxisHeight};o.ranges=function(t,e){var i=Math.min,o=Math.max,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1,n=u(t),l=[];n=n.filter((function(t){return"object"==a(t)&&null!==t?t.constructor==Array?null!==t:null!==t.value:null!==t})),n.map((function(t){"object"==a(t)?t.constructor==Array?"candle"==e.type?t.map((function(t){l.push(t)})):l.push(t[0]):l.push(t.value):l.push(t)}));var s=0,h=0;if(0<l.length&&(s=i.apply(this,l),h=o.apply(this,l)),-1<r?("number"==typeof e.xAxis.data[r].min&&(s=i(e.xAxis.data[r].min,s)),"number"==typeof e.xAxis.data[r].max&&(h=o(e.xAxis.data[r].max,h))):("number"==typeof e.xAxis.min&&(s=i(e.xAxis.min,s)),"number"==typeof e.xAxis.max&&(h=o(e.xAxis.max,h))),s===h){var c=h||10;h+=c}for(var d=s,x=h,p=[],g=(x-d)/e.xAxis.splitNumber,f=0;f<=e.xAxis.splitNumber;f++)p.push(d+g*f);return p}(t,e,i),o.rangesFormat=o.ranges.map((function(t){return t=e.xAxis.format?e.xAxis.format(t):n.toFixed(t,2),t}));var r=o.ranges.map((function(t){return t=n.toFixed(t,2),t=e.xAxis.format?e.xAxis.format(+t):t,t}));o=Object.assign(o,H(r,e));var l=o.eachSpacing,s=r.map((function(t){return f(t)})),h=Math.max.apply(this,s);return h+2*i.xAxisTextPadding>l&&(o.angle=45*Math.PI/180,o.xAxisHeight=2*i.xAxisTextPadding+h*Math.sin(o.angle)),!0===e.xAxis.disabled&&(o.xAxisHeight=0),o}function R(t,e,i,a,o){var r=Math.max,n=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,l=o.extra.radar||{};l.max=l.max||0;for(var s=r(l.max,r.apply(null,u(a))),h=[],c=function(o){var r=a[o],l={};l.color=r.color,l.legendShape=r.legendShape,l.pointShape=r.pointShape,l.data=[],r.data.forEach((function(a,o){var r={};r.angle=t[o],r.proportion=a/s,r.position=d(i*r.proportion*n*Math.cos(r.angle),i*r.proportion*n*Math.sin(r.angle),e),l.data.push(r)})),h.push(l)},x=0;x<a.length;x++)c(x);return h}function k(t,e){for(var i,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=0,r=0,n=0;n<t.length;n++)i=t[n],i.data=null===i.data?0:i.data,o+=i.data;for(var l,s=0;s<t.length;s++)l=t[s],l.data=null===l.data?0:l.data,l._proportion_=0===o?1/t.length*a:l.data/o*a,l._radius_=e;for(var h,c=0;c<t.length;c++)h=t[c],h._start_=r,r+=2*h._proportion_*Math.PI;return t}function C(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;t=t.sort((function(t,e){return parseInt(e.data)-parseInt(t.data)}));for(var a=0;a<t.length;a++)t[a].radius=t[a].data/t[0].data*e*i,t[a]._proportion_=t[a].data/t[0].data;return t.reverse()}function M(t,e,i,a){for(var o,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=0,l=0,s=[],h=0;h<t.length;h++)o=t[h],o.data=null===o.data?0:o.data,n+=o.data,s.push(o.data);for(var c,d=Math.min.apply(null,s),x=Math.max.apply(null,s),p=0;p<t.length;p++)c=t[p],c.data=null===c.data?0:c.data,0===n||"area"==e?(c._proportion_=c.data/n*r,c._rose_proportion_=1/t.length*r):(c._proportion_=c.data/n*r,c._rose_proportion_=c.data/n*r),c._radius_=i+(a-i)*((c.data-d)/(x-d));for(var g,f=0;f<t.length;f++)g=t[f],g._start_=l,l+=2*g._rose_proportion_*Math.PI;return t}function z(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;1==i&&(i=.999999);for(var a,o=0;o<t.length;o++){a=t[o],a.data=null===a.data?0:a.data;var r=void 0;r="circle"==e.type?2:e.endAngle<e.startAngle?2+e.endAngle-e.startAngle:e.startAngle-e.endAngle,a._proportion_=r*a.data*i+e.startAngle,2<=a._proportion_&&(a._proportion_%=2)}return t}function W(t,e,i){for(var a=e,o=0;o<t.length;o++)t[o].value=null===t[o].value?0:t[o].value,t[o]._startAngle_=a,t[o]._endAngle_=(e-i+1)*t[o].value+e,2<=t[o]._endAngle_&&(t[o]._endAngle_%=2),a=t[o]._endAngle_;return t}function O(t,e,i){for(var a,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,r=0;r<t.length;r++){if(a=t[r],a.data=null===a.data?0:a.data,"auto"==i.pointer.color){for(var n=0;n<e.length;n++)if(a.data<=e[n].value){a.color=e[n].color;break}}else a.color=i.pointer.color;var l=i.startAngle-i.endAngle+1;a._endAngle_=l*a.data+i.startAngle,a._oldAngle_=i.oldAngle,i.oldAngle<i.endAngle&&(a._oldAngle_+=2),a._proportion_=a.data>=i.oldData?(a._endAngle_-a._oldAngle_)*o+i.oldAngle:a._oldAngle_-(a._oldAngle_-a._endAngle_)*o,2<=a._proportion_&&(a._proportion_%=2)}return t}function I(t,e,i,a,o,r){return t.map((function(t){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/i),r.extra.column&&r.extra.column.width&&0<+r.extra.column.width&&(t.width=Math.min(t.width,+r.extra.column.width)),0>=t.width&&(t.width=1),t.x+=(a+.5-i/2)*t.width,t)}))}function E(t,e,i,a,o,r,n){return t.map((function(t){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/2),r.extra.column&&r.extra.column.width&&0<+r.extra.column.width&&(t.width=Math.min(t.width,+r.extra.column.width)),0<a&&(t.width-=2*n),t)}))}function B(t,e,i,a,o,r){return t.map((function(t){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/2),r.extra.column&&r.extra.column.width&&0<+r.extra.column.width&&(t.width=Math.min(t.width,+r.extra.column.width)),t)}))}function H(t,e){var i=e.width-e.area[1]-e.area[3],a=e.enableScroll?Math.min(e.xAxis.itemCount,t.length):t.length;("line"==e.type||"area"==e.type)&&1<a&&"justify"==e.xAxis.boundaryGap&&(a-=1);var o=i/a,r=[],n=e.area[3],l=e.width-e.area[1];return t.forEach((function(t,e){r.push(n+e*o)})),"justify"!==e.xAxis.boundaryGap&&(!0===e.enableScroll?r.push(n+t.length*o):r.push(l)),{xAxisPoints:r,startX:n,endX:l,eachSpacing:o}}function N(t,e,i,a,o,r){var n=Math.round,l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:1,s=[],h=r.height-r.area[0]-r.area[2];return t.forEach((function(t,c){if(null===t)s.push(null);else{var d=[];t.forEach((function(t){var s={x:a[c]+n(o/2)},x=t.value||t,p=h*(x-e)/(i-e);p*=l,s.y=r.height-n(p)-r.area[2],d.push(s)})),s.push(d)}})),s}function X(t,e,i,o,r,n){var l=Math.round,s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:1,h="center";("line"==n.type||"area"==n.type)&&(h=n.xAxis.boundaryGap);var c=[],d=n.height-n.area[0]-n.area[2],x=n.width-n.area[1]-n.area[3];return t.forEach((function(t,p){if(null===t)c.push(null);else{var g={color:t.color,x:o[p]},f=t;if("object"==a(t)&&null!==t)if(t.constructor==Array){var u,y,v;u=[].concat(n.chartData.xAxisData.ranges),y=u.shift(),v=u.pop(),f=t[1],g.x=n.area[3]+x*(t[0]-y)/(v-y)}else f=t.value;"center"==h&&(g.x+=l(r/2));var m=d*(f-e)/(i-e);m*=s,g.y=n.height-l(m)-n.area[2],c.push(g)}})),c}function G(t,e,i,a,o,r,n,l,s){var h=Math.round,c=9<arguments.length&&void 0!==arguments[9]?arguments[9]:1,d=[],x=r.height-r.area[0]-r.area[2];return t.forEach((function(t,n){if(null===t)d.push(null);else{var p={color:t.color,x:a[n]+h(o/2)};if(0<l){for(var g=0,f=0;f<=l;f++)g+=s[f].data[n];var u=g-t,y=x*(g-e)/(i-e),v=x*(u-e)/(i-e)}else g=t,y=x*(g-e)/(i-e),v=0;var m=v;y*=c,m*=c,p.y=r.height-h(y)-r.area[2],p.y0=r.height-h(m)-r.area[2],d.push(p)}})),d}function j(t,e,i,o){var r,n=Math.min,l=Math.max,s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;r="stack"==o?y(t,e.categories.length):u(t);var h=[];r=r.filter((function(t){return"object"==a(t)&&null!==t?t.constructor==Array?null!==t:null!==t.value:null!==t})),r.map((function(t){"object"==a(t)?t.constructor==Array?"candle"==e.type?t.map((function(t){h.push(t)})):h.push(t[1]):h.push(t.value):h.push(t)}));var c=0,d=0;if(0<h.length&&(c=n.apply(this,h),d=l.apply(this,h)),-1<s?("number"==typeof e.yAxis.data[s].min&&(c=n(e.yAxis.data[s].min,c)),"number"==typeof e.yAxis.data[s].max&&(d=l(e.yAxis.data[s].max,d))):("number"==typeof e.yAxis.min&&(c=n(e.yAxis.min,c)),"number"==typeof e.yAxis.max&&(d=l(e.yAxis.max,d))),c===d){var x=d||10;d+=x}for(var p=g(c,d),f=p.minRange,v=p.maxRange,m=[],b=(v-f)/e.yAxis.splitNumber,A=0;A<=e.yAxis.splitNumber;A++)m.push(f+b*A);return m.reverse()}function J(t,e,i){var a=Math.max,o=r({},{type:""},e.extra.column),l=e.yAxis.data.length,s=Array(l);if(0<l){for(var h=0;h<l;h++){s[h]=[];for(var c=0;c<t.length;c++)t[c].index==h&&s[h].push(t[c])}for(var d,x=Array(l),p=Array(l),g=Array(l),u=function(t,r){r=e.yAxis.data[t],1==e.yAxis.disabled&&(r.disabled=!0),x[t]=j(s[t],e,i,o.type,t);var l=r.fontSize||i.fontSize;g[t]={position:r.position?r.position:"left",width:0},p[t]=x[t].map((function(e){return d=r,e=n.toFixed(e,6),e=r.format?r.format(+e):e,g[t].width=a(g[t].width,f(e,l)+5),e}));var h=r.calibration?4*e.pixelRatio:0;g[t].width+=h+3*e.pixelRatio,!0===r.disabled&&(g[t].width=0),d=r},y=0;y<l;y++)u(y,d)}else{x=[,],p=[,],g=[,];x[0]=j(t,e,i,o.type),g[0]={position:"left",width:0};var v=e.yAxis.fontSize||i.fontSize;p[0]=x[0].map((function(t){return t=n.toFixed(t,6),t=e.yAxis.format?e.yAxis.format(+t):t,g[0].width=a(g[0].width,f(t,v)+5),t})),g[0].width+=3*e.pixelRatio,!0===e.yAxis.disabled?(g[0]={position:"left",width:0},e.yAxis.data[0]={disabled:!0}):e.yAxis.data[0]={disabled:!1,position:"left",max:e.yAxis.max,min:e.yAxis.min,format:e.yAxis.format}}return{rangesFormat:p,ranges:x,yAxisWidth:g}}function Y(t,e){var i=Math.PI;!0===e.rotateLock?!0!==e._rotate_&&(t.translate(e.height,0),t.rotate(90*i/180),e._rotate_=!0):(t.translate(e.height,0),t.rotate(90*i/180))}function $(t,e,i,a,o){a.beginPath(),"hollow"==o.dataPointShapeType?(a.setStrokeStyle(e),a.setFillStyle(o.background),a.setLineWidth(2*o.pixelRatio)):(a.setStrokeStyle("#ffffff"),a.setFillStyle(e),a.setLineWidth(1*o.pixelRatio)),"diamond"===i?t.forEach((function(t){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y),a.lineTo(t.x,t.y+4.5),a.lineTo(t.x+4.5,t.y),a.lineTo(t.x,t.y-4.5))})):"circle"===i?t.forEach((function(t){null!==t&&(a.moveTo(t.x+2.5*o.pixelRatio,t.y),a.arc(t.x,t.y,3*o.pixelRatio,0,2*Math.PI,!1))})):"rect"===i?t.forEach((function(t){null!==t&&(a.moveTo(t.x-3.5,t.y-3.5),a.rect(t.x-3.5,t.y-3.5,7,7))})):"triangle"==i&&t.forEach((function(t){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y+4.5),a.lineTo(t.x+4.5,t.y+4.5),a.lineTo(t.x,t.y-4.5))})),a.closePath(),a.fill(),a.stroke()}function q(t,e,i,a){var o=t.title.fontSize||e.titleFontSize,r=t.subtitle.fontSize||e.subtitleFontSize,n=t.title.name||"",l=t.subtitle.name||"",s=t.title.color||e.titleColor,h=t.subtitle.color||e.subtitleColor,c=n?o:0,d=l?r:0;if(l){var x=f(l,r),p=a.x-x/2+(t.subtitle.offsetX||0),g=a.y+r/2+(t.subtitle.offsetY||0);n&&(g+=(c+5)/2),i.beginPath(),i.setFontSize(r),i.setFillStyle(h),i.fillText(l,p,g),i.closePath(),i.stroke()}if(n){var u=f(n,o),y=a.x-u/2+(t.title.offsetX||0),v=a.y+o/2+(t.title.offsetY||0);l&&(v-=(d+5)/2),i.beginPath(),i.setFontSize(o),i.setFillStyle(s),i.fillText(n,y,v),i.closePath(),i.stroke()}}function Z(t,e,i,o){var r=e.data;t.forEach((function(t,n){if(null!==t){o.beginPath(),o.setFontSize(e.textSize||i.fontSize),o.setFillStyle(e.textColor||"#666666");var l=r[n];"object"==a(r[n])&&null!==r[n]&&(l=r[n].constructor==Array?r[n][1]:r[n].value);var s=e.format?e.format(l):l;o.fillText(s+"",t.x-f(s,e.textSize||i.fontSize)/2,t.y-4),o.closePath(),o.stroke()}}))}function K(t,e,i,a,o,r){var n=Math.PI;e-=t.width/2+o.gaugeLabelTextMargin;for(var l=t.startAngle-t.endAngle+1,s=l/t.splitLine.splitNumber,h=t.endNumber-t.startNumber,c=h/t.splitLine.splitNumber,d=t.startAngle,x=t.startNumber,p=0;p<t.splitLine.splitNumber+1;p++){var g={x:e*Math.cos(d*n),y:e*Math.sin(d*n)},u=t.labelFormat?t.labelFormat(x):x;g.x+=i.x-f(u)/2,g.y+=i.y;var y=g.x,v=g.y;r.beginPath(),r.setFontSize(o.fontSize),r.setFillStyle(t.labelColor||"#666666"),r.fillText(u,y,v+o.fontSize/2),r.closePath(),r.stroke(),d+=s,2<=d&&(d%=2),x+=c}}function Q(t,e,i,a,o,r){var l=a.extra.radar||{};e+=o.radarLabelTextMargin,t.forEach((function(t,s){var h={x:e*Math.cos(t),y:e*Math.sin(t)},c=d(h.x,h.y,i),x=c.x,p=c.y;n.approximatelyEqual(h.x,0)?x-=f(a.categories[s]||"")/2:0>h.x&&(x-=f(a.categories[s]||"")),r.beginPath(),r.setFontSize(o.fontSize),r.setFillStyle(l.labelColor||"#666666"),r.fillText(a.categories[s]||"",x,p+o.fontSize/2),r.closePath(),r.stroke()}))}function U(t,e,i,a,o,r){for(var l=Math.cos,s=Math.sin,h=Math.min,c=Math.max,p=Math.PI,g=i.pieChartLinePadding,u=[],y=null,v=t.map((function(t){var e=t.format?t.format(+t._proportion_.toFixed(2)):n.toFixed(100*t._proportion_.toFixed(4))+"%";t._rose_proportion_&&(t._proportion_=t._rose_proportion_);var i=2*p-(t._start_+2*p*t._proportion_/2),a=t.color,o=t._radius_;return{arc:i,text:e,color:a,radius:o,textColor:t.textColor,textSize:t.textSize}})),m=0;m<v.length;m++){var b=v[m],A=l(b.arc)*(b.radius+g),S=s(b.arc)*(b.radius+g),T=l(b.arc)*b.radius,P=s(b.arc)*b.radius,w=0<=A?A+i.pieChartTextPadding:A-i.pieChartTextPadding,_=S,L=f(b.text,b.textSize||i.fontSize),F=_;y&&n.isSameXCoordinateArea(y.start,{x:w})&&(F=0<w?h(_,y.start.y):0>A||0<_?c(_,y.start.y):h(_,y.start.y)),0>w&&(w-=L);var D={lineStart:{x:T,y:P},lineEnd:{x:A,y:S},start:{x:w,y:F},width:L,height:i.fontSize,text:b.text,color:b.color,textColor:b.textColor,textSize:b.textSize};y=x(D,y),u.push(y)}for(var R=0;R<u.length;R++){var k=u[R],C=d(k.lineStart.x,k.lineStart.y,r),M=d(k.lineEnd.x,k.lineEnd.y,r),z=d(k.start.x,k.start.y,r);a.setLineWidth(1*e.pixelRatio),a.setFontSize(i.fontSize),a.beginPath(),a.setStrokeStyle(k.color),a.setFillStyle(k.color),a.moveTo(C.x,C.y);var W=0>k.start.x?z.x+k.width:z.x,O=0>k.start.x?z.x-5:z.x+5;a.quadraticCurveTo(M.x,M.y,W,z.y),a.moveTo(C.x,C.y),a.stroke(),a.closePath(),a.beginPath(),a.moveTo(z.x+k.width,z.y),a.arc(W,z.y,2,0,2*p),a.closePath(),a.fill(),a.beginPath(),a.setFontSize(k.textSize||i.fontSize),a.setFillStyle(k.textColor||"#666666"),a.fillText(k.text,O,z.y+3),a.closePath(),a.stroke(),a.closePath()}}function V(t,e,i){for(var a,o=r({},{type:"solid",dashLength:4,data:[]},t.extra.markLine),n=t.area[3],s=t.width-t.area[1],h=function(t,e){for(var i,a,o=e.height-e.area[0]-e.area[2],r=0;r<t.length;r++){t[r].yAxisIndex=t[r].yAxisIndex?t[r].yAxisIndex:0;var n=[].concat(e.chartData.yAxisData.ranges[t[r].yAxisIndex]);i=n.pop(),a=n.shift();var l=o*(t[r].value-i)/(a-i);t[r].y=e.height-Math.round(l)-e.area[2]}return t}(o.data,t),c=0;c<h.length;c++)if(a=r({},{lineColor:"#DE4A42",showLabel:!1,labelFontColor:"#666666",labelBgColor:"#DFE8FF",labelBgOpacity:.8,yAxisIndex:0},h[c]),"dash"==o.type&&i.setLineDash([o.dashLength,o.dashLength]),i.setStrokeStyle(a.lineColor),i.setLineWidth(1*t.pixelRatio),i.beginPath(),i.moveTo(n,a.y),i.lineTo(s,a.y),i.stroke(),i.setLineDash([]),a.showLabel){var d=t.yAxis.format?t.yAxis.format(+a.value):a.value;i.setFontSize(e.fontSize);var x=f(d,e.fontSize),p=t.padding[3]+e.yAxisTitleWidth-e.toolTipPadding,g=Math.max(t.area[3],x+2*e.toolTipPadding),u=g-p,y=a.y;i.setFillStyle(l(a.labelBgColor,a.labelBgOpacity)),i.setStrokeStyle(a.labelBgColor),i.setLineWidth(1*t.pixelRatio),i.beginPath(),i.rect(p,y-.5*e.fontSize-e.toolTipPadding,u,e.fontSize+2*e.toolTipPadding),i.closePath(),i.stroke(),i.fill(),i.beginPath(),i.setFontSize(e.fontSize),i.setFillStyle(a.labelFontColor),i.fillText(d+"",p+(u-x)/2,y+.5*e.fontSize),i.stroke()}}function tt(t,e,i,a,o){var n=r({},{activeBgColor:"#000000",activeBgOpacity:.08},e.extra.tooltip),s=e.area[0],h=e.height-e.area[2];a.beginPath(),a.setFillStyle(l(n.activeBgColor,n.activeBgOpacity)),a.rect(t-o/2,s,o,h-s),a.closePath(),a.fill()}function et(t,e,i,a,o){var n=Math.round,s=r({},{showBox:!0,bgColor:"#000000",bgOpacity:.7,fontColor:"#FFFFFF"},i.extra.tooltip),h=4*i.pixelRatio,c=5*i.pixelRatio,d=8*i.pixelRatio,x=!1;("line"==i.type||"area"==i.type||"candle"==i.type||"mix"==i.type)&&function(t,e,i,a){var o=e.extra.tooltip||{};o.gridType=null==o.gridType?"solid":o.gridType,o.dashLength=null==o.dashLength?4:o.dashLength;var r=e.area[0],n=e.height-e.area[2];if("dash"==o.gridType&&a.setLineDash([o.dashLength,o.dashLength]),a.setStrokeStyle(o.gridColor||"#cccccc"),a.setLineWidth(1*e.pixelRatio),a.beginPath(),a.moveTo(t,r),a.lineTo(t,n),a.stroke(),a.setLineDash([]),o.xAxisLabel){var s=e.categories[e.tooltip.index];a.setFontSize(i.fontSize);var h=f(s,i.fontSize),c=t-.5*h,d=n;a.beginPath(),a.setFillStyle(l(o.labelBgColor||i.toolTipBackground,o.labelBgOpacity||i.toolTipOpacity)),a.setStrokeStyle(o.labelBgColor||i.toolTipBackground),a.setLineWidth(1*e.pixelRatio),a.rect(c-i.toolTipPadding,d,h+2*i.toolTipPadding,i.fontSize+2*i.toolTipPadding),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(o.labelFontColor||i.fontColor),a.fillText(s+"",c,d+i.toolTipPadding+i.fontSize),a.closePath(),a.stroke()}}(i.tooltip.offset.x,i,a,o),e=r({x:0,y:0},e),e.y-=8*i.pixelRatio;var p=t.map((function(t){return f(t.text,a.fontSize)})),g=h+c+4*a.toolTipPadding+Math.max.apply(null,p),u=2*a.toolTipPadding+t.length*a.toolTipLineHeight;0==s.showBox||(e.x-Math.abs(i._scrollDistance_)+d+g>i.width&&(x=!0),u+e.y>i.height&&(e.y=i.height-u),o.beginPath(),o.setFillStyle(l(s.bgColor||a.toolTipBackground,s.bgOpacity||a.toolTipOpacity)),x?(o.moveTo(e.x,e.y+10*i.pixelRatio),o.lineTo(e.x-d,e.y+10*i.pixelRatio-5*i.pixelRatio),o.lineTo(e.x-d,e.y),o.lineTo(e.x-d-n(g),e.y),o.lineTo(e.x-d-n(g),e.y+u),o.lineTo(e.x-d,e.y+u),o.lineTo(e.x-d,e.y+10*i.pixelRatio+5*i.pixelRatio),o.lineTo(e.x,e.y+10*i.pixelRatio)):(o.moveTo(e.x,e.y+10*i.pixelRatio),o.lineTo(e.x+d,e.y+10*i.pixelRatio-5*i.pixelRatio),o.lineTo(e.x+d,e.y),o.lineTo(e.x+d+n(g),e.y),o.lineTo(e.x+d+n(g),e.y+u),o.lineTo(e.x+d,e.y+u),o.lineTo(e.x+d,e.y+10*i.pixelRatio+5*i.pixelRatio),o.lineTo(e.x,e.y+10*i.pixelRatio)),o.closePath(),o.fill(),t.forEach((function(t,i){if(null!==t.color){o.beginPath(),o.setFillStyle(t.color);var r=e.x+d+2*a.toolTipPadding,n=e.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding+1;x&&(r=e.x-g-d+2*a.toolTipPadding),o.fillRect(r,n,h,a.fontSize),o.closePath()}})),t.forEach((function(t,i){var r=e.x+d+2*a.toolTipPadding+h+c;x&&(r=e.x-g-d+2*a.toolTipPadding+ +h+c);var n=e.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding;o.beginPath(),o.setFontSize(a.fontSize),o.setFillStyle(s.fontColor),o.fillText(t.text,r,n+a.fontSize),o.closePath(),o.stroke()})))}function it(t,e,i,a,o,n){var s=t.extra.tooltip||{};s.horizentalLine&&t.tooltip&&1===a&&("line"==t.type||"area"==t.type||"column"==t.type||"candle"==t.type||"mix"==t.type)&&function(t,e,i,a){var o=Math.max,n=r({},{gridType:"solid",dashLength:4},t.extra.tooltip),s=t.area[3],h=t.width-t.area[1];if("dash"==n.gridType&&i.setLineDash([n.dashLength,n.dashLength]),i.setStrokeStyle(n.gridColor||"#cccccc"),i.setLineWidth(1*t.pixelRatio),i.beginPath(),i.moveTo(s,t.tooltip.offset.y),i.lineTo(h,t.tooltip.offset.y),i.stroke(),i.setLineDash([]),n.yAxisLabel)for(var c=function(t,e,i){for(var a=[].concat(i.chartData.yAxisData.ranges),o=i.height-i.area[0]-i.area[2],r=i.area[0],n=[],l=0;l<a.length;l++){var s=a[l].shift(),h=a[l].pop(),c=s-(s-h)*(t-r)/o;c=i.yAxis.data[l].format?i.yAxis.data[l].format(+c):c.toFixed(0),n.push(c+"")}return n}(t.tooltip.offset.y,t.series,t),d=t.chartData.yAxisData.yAxisWidth,x=t.area[3],p=t.width-t.area[1],g=0;g<c.length;g++){i.setFontSize(e.fontSize);var u,y=void 0,v=void 0,m=f(c[g],e.fontSize);"left"==d[g].position?(y=x-d[g].width,v=o(y,y+m+2*e.toolTipPadding)):(y=p,v=o(y+d[g].width,y+m+2*e.toolTipPadding)),u=v-y;var b=y+(u-m)/2,A=t.tooltip.offset.y;i.beginPath(),i.setFillStyle(l(n.labelBgColor||e.toolTipBackground,n.labelBgOpacity||e.toolTipOpacity)),i.setStrokeStyle(n.labelBgColor||e.toolTipBackground),i.setLineWidth(1*t.pixelRatio),i.rect(y,A-.5*e.fontSize-e.toolTipPadding,u,e.fontSize+2*e.toolTipPadding),i.closePath(),i.stroke(),i.fill(),i.beginPath(),i.setFontSize(e.fontSize),i.setFillStyle(n.labelFontColor||e.fontColor),i.fillText(c[g],b,A+.5*e.fontSize),i.closePath(),i.stroke(),"left"==d[g].position?x-=d[g].width+t.yAxis.padding:p+=d[g].width+t.yAxis.padding}}(t,e,i),i.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&i.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&et(t.tooltip.textList,t.tooltip.offset,t,e,i),i.restore()}function at(t,e,i,a){var o=Math.ceil,r=e.chartData.xAxisData,n=r.xAxisPoints,l=r.startX,s=r.endX,h=r.eachSpacing,c="center";("line"==e.type||"area"==e.type)&&(c=e.xAxis.boundaryGap);var d=e.height-e.area[2],x=e.area[0];if(e.enableScroll&&e.xAxis.scrollShow){var p=e.height-e.area[2]+i.xAxisHeight,g=s-l,u=h*(n.length-1),y=0;e._scrollDistance_&&(y=-e._scrollDistance_*g/u),a.beginPath(),a.setLineCap("round"),a.setLineWidth(6*e.pixelRatio),a.setStrokeStyle(e.xAxis.scrollBackgroundColor||"#EFEBEF"),a.moveTo(l,p),a.lineTo(s,p),a.stroke(),a.closePath(),a.beginPath(),a.setLineCap("round"),a.setLineWidth(6*e.pixelRatio),a.setStrokeStyle(e.xAxis.scrollColor||"#A6A6A6"),a.moveTo(l+y,p),a.lineTo(l+y+g*g/u,p),a.stroke(),a.closePath(),a.setLineCap("butt")}if(a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&a.translate(e._scrollDistance_,0),!0===e.xAxis.calibration&&(a.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),a.setLineCap("butt"),a.setLineWidth(1*e.pixelRatio),n.forEach((function(t,i){0<i&&(a.beginPath(),a.moveTo(t-h/2,d),a.lineTo(t-h/2,d+3*e.pixelRatio),a.closePath(),a.stroke())}))),!0!==e.xAxis.disableGrid&&(a.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),a.setLineCap("butt"),a.setLineWidth(1*e.pixelRatio),"dash"==e.xAxis.gridType&&a.setLineDash([e.xAxis.dashLength,e.xAxis.dashLength]),e.xAxis.gridEval=e.xAxis.gridEval||1,n.forEach((function(t,i){0==i%e.xAxis.gridEval&&(a.beginPath(),a.moveTo(t,d),a.lineTo(t,x),a.stroke())})),a.setLineDash([])),!0!==e.xAxis.disabled){var v=t.length;e.xAxis.labelCount&&(v=e.xAxis.itemCount?o(t.length/e.xAxis.itemCount*e.xAxis.labelCount):e.xAxis.labelCount,v-=1);for(var m=o(t.length/v),b=[],A=t.length,S=0;S<A;S++)0==S%m?b.push(t[S]):b.push("");b[A-1]=t[A-1];var T=e.xAxis.fontSize||i.fontSize;0===i._xAxisTextAngle_?b.forEach((function(t,o){var r=-f(t+"",T)/2;"center"==c&&(r+=h/2);var l=0;e.xAxis.scrollShow&&(l=6*e.pixelRatio),a.beginPath(),a.setFontSize(T),a.setFillStyle(e.xAxis.fontColor||"#666666"),a.fillText(t+"",n[o]+r,d+T+(i.xAxisHeight-l-T)/2),a.closePath(),a.stroke()})):b.forEach((function(t,o){a.save(),a.beginPath(),a.setFontSize(T),a.setFillStyle(e.xAxis.fontColor||"#666666");var r=f(t+"",T),l=-r;"center"==c&&(l+=h/2);var s=function(t,e,i){var a=t,o=i-e,r=a+(i-o-a)/1.4142135623730951;return r*=-1,{transX:r,transY:.41421356237309515*(i-o)-(i-o-a)/1.4142135623730951}}(n[o]+h/2,d+T/2+5,e.height),x=s.transX,p=s.transY;a.rotate(-1*i._xAxisTextAngle_),a.translate(x,p),a.fillText(t+"",n[o]+l,d+T+5),a.closePath(),a.stroke(),a.restore()}))}a.restore(),e.xAxis.axisLine&&(a.beginPath(),a.setStrokeStyle(e.xAxis.axisLineColor),a.setLineWidth(1*e.pixelRatio),a.moveTo(l,e.height-e.area[2]),a.lineTo(s,e.height-e.area[2]),a.stroke())}function ot(t,e,i,a){if(!0!==e.yAxis.disableGrid){for(var o=e.height-e.area[0]-e.area[2],r=o/e.yAxis.splitNumber,n=e.area[3],l=e.chartData.xAxisData.xAxisPoints,s=e.chartData.xAxisData.eachSpacing,h=s*(l.length-1),c=[],d=0;d<e.yAxis.splitNumber+1;d++)c.push(e.height-e.area[2]-r*d);a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&a.translate(e._scrollDistance_,0),"dash"==e.yAxis.gridType&&a.setLineDash([e.yAxis.dashLength,e.yAxis.dashLength]),a.setStrokeStyle(e.yAxis.gridColor),a.setLineWidth(1*e.pixelRatio),c.forEach((function(t){a.beginPath(),a.moveTo(n,t),a.lineTo(n+h,t),a.stroke()})),a.setLineDash([]),a.restore()}}function rt(t,e,i,a){if(!0!==e.yAxis.disabled){var o=e.height-e.area[0]-e.area[2],r=o/e.yAxis.splitNumber,n=e.area[3],l=e.width-e.area[1],s=e.height-e.area[2],h=s+i.xAxisHeight;e.xAxis.scrollShow&&(h-=3*e.pixelRatio),e.xAxis.rotateLabel&&(h=e.height-e.area[2]+3),a.beginPath(),a.setFillStyle(e.background||"#ffffff"),0>e._scrollDistance_&&a.fillRect(0,0,n,h),1==e.enableScroll&&a.fillRect(l,0,e.width,h),a.closePath(),a.stroke();for(var c=[],d=0;d<=e.yAxis.splitNumber;d++)c.push(e.area[0]+r*d);for(var x,p=e.area[3],g=e.width-e.area[1],u=function(t,o){if(t=e.yAxis.data[o],!0!==t.disabled){var r=e.chartData.yAxisData.rangesFormat[o],n=t.fontSize||i.fontSize,l=e.chartData.yAxisData.yAxisWidth[o];if(r.forEach((function(i,o){var r=c[o]?c[o]:s;a.beginPath(),a.setFontSize(n),a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(t.axisLineColor||"#cccccc"),a.setFillStyle(t.fontColor||"#666666"),"left"==l.position?(a.fillText(i+"",p-l.width,r+n/2),1==t.calibration&&(a.moveTo(p,r),a.lineTo(p-3*e.pixelRatio,r))):(a.fillText(i+"",g+4*e.pixelRatio,r+n/2),1==t.calibration&&(a.moveTo(g,r),a.lineTo(g+3*e.pixelRatio,r))),a.closePath(),a.stroke()})),!1!==t.axisLine&&(a.beginPath(),a.setStrokeStyle(t.axisLineColor||"#cccccc"),a.setLineWidth(1*e.pixelRatio),"left"==l.position?(a.moveTo(p,e.height-e.area[2]),a.lineTo(p,e.area[0])):(a.moveTo(g,e.height-e.area[2]),a.lineTo(g,e.area[0])),a.stroke()),e.yAxis.showTitle){var h=t.titleFontSize||i.fontSize,d=t.title;a.beginPath(),a.setFontSize(h),a.setFillStyle(t.titleFontColor||"#666666"),"left"==l.position?a.fillText(d,p-f(d,h)/2,e.area[0]-10*e.pixelRatio):a.fillText(d,g-f(d,h)/2,e.area[0]-10*e.pixelRatio),a.closePath(),a.stroke()}"left"==l.position?p-=l.width+e.yAxis.padding:g+=l.width+e.yAxis.padding}x=t},y=0;y<e.yAxis.data.length;y++)u(x,y)}}function nt(t,e,i,a,o){if(!1!==e.legend.show){var r=o.legendData,n=r.points,l=r.area,s=e.legend.padding,h=e.legend.fontSize,c=15*e.pixelRatio,d=5*e.pixelRatio,x=e.legend.itemGap,p=Math.max(e.legend.lineHeight*e.pixelRatio,h);a.beginPath(),a.setLineWidth(e.legend.borderWidth),a.setStrokeStyle(e.legend.borderColor),a.setFillStyle(e.legend.backgroundColor),a.moveTo(l.start.x,l.start.y),a.rect(l.start.x,l.start.y,l.width,l.height),a.closePath(),a.fill(),a.stroke(),n.forEach((function(t,o){var n,g=0;g=r.widthArr[o],n=r.heightArr[o];var u=0,y=0;"top"==e.legend.position||"bottom"==e.legend.position?(u=l.start.x+(l.width-g)/2,y=l.start.y+s+o*p):(g=0==o?0:r.widthArr[o-1],u=l.start.x+s+g,y=l.start.y+s+(l.height-n)/2),a.setFontSize(i.fontSize);for(var v,m=0;m<t.length;m++){switch(v=t[m],v.area=[0,0,0,0],v.area[0]=u,v.area[1]=y,v.area[3]=y+p,a.beginPath(),a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(v.show?v.color:e.legend.hiddenColor),a.setFillStyle(v.show?v.color:e.legend.hiddenColor),v.legendShape){case"line":a.moveTo(u,y+.5*p-2*e.pixelRatio),a.fillRect(u,y+.5*p-2*e.pixelRatio,15*e.pixelRatio,4*e.pixelRatio);break;case"triangle":a.moveTo(u+7.5*e.pixelRatio,y+.5*p-5*e.pixelRatio),a.lineTo(u+2.5*e.pixelRatio,y+.5*p+5*e.pixelRatio),a.lineTo(u+12.5*e.pixelRatio,y+.5*p+5*e.pixelRatio),a.lineTo(u+7.5*e.pixelRatio,y+.5*p-5*e.pixelRatio);break;case"diamond":a.moveTo(u+7.5*e.pixelRatio,y+.5*p-5*e.pixelRatio),a.lineTo(u+2.5*e.pixelRatio,y+.5*p),a.lineTo(u+7.5*e.pixelRatio,y+.5*p+5*e.pixelRatio),a.lineTo(u+12.5*e.pixelRatio,y+.5*p),a.lineTo(u+7.5*e.pixelRatio,y+.5*p-5*e.pixelRatio);break;case"circle":a.moveTo(u+7.5*e.pixelRatio,y+.5*p),a.arc(u+7.5*e.pixelRatio,y+.5*p,5*e.pixelRatio,0,2*Math.PI);break;case"rect":a.moveTo(u,y+.5*p-5*e.pixelRatio),a.fillRect(u,y+.5*p-5*e.pixelRatio,15*e.pixelRatio,10*e.pixelRatio);break;default:a.moveTo(u,y+.5*p-5*e.pixelRatio),a.fillRect(u,y+.5*p-5*e.pixelRatio,15*e.pixelRatio,10*e.pixelRatio)}a.closePath(),a.fill(),a.stroke(),u+=c+d,a.beginPath(),a.setFontSize(h),a.setFillStyle(v.show?e.legend.fontColor:e.legend.hiddenColor),a.fillText(v.name,u,y+(.5*p+.5*h-2)),a.closePath(),a.stroke(),"top"==e.legend.position||"bottom"==e.legend.position?(u+=f(v.name,h)+x,v.area[2]=u):(v.area[2]=u+f(v.name,h)+x,u-=c+d,y+=p)}}))}}function lt(t,e,i){i=0==i?1:i;for(var a=[],o=0;o<i;o++)a[o]=Math.random();return Math.floor(a.reduce((function(t,e){return t+e}))/i*(e-t))+t}function st(t,e,i,a){for(var o=!1,r=0;r<e.length;r++)if(e[r].area){if(!(t[3]<e[r].area[1]||t[0]>e[r].area[2]||t[1]>e[r].area[3]||t[2]<e[r].area[0])){o=!0;break}if(0>t[0]||0>t[1]||t[2]>i||t[3]>a){o=!0;break}o=!1}return o}function ht(t,e,i,a,o,r){return{x:(e-i.xMin)*a+o,y:(i.yMax-t)*a+r}}function ct(t,e,i){if(e[1]==i[1])return!1;if(e[1]>t[1]&&i[1]>t[1])return!1;if(e[1]<t[1]&&i[1]<t[1])return!1;if(e[1]==t[1]&&i[1]>t[1])return!1;if(i[1]==t[1]&&e[1]>t[1])return!1;if(e[0]<t[0]&&i[1]<t[1])return!1;var a=i[0]-(i[0]-e[0])*(i[1]-t[1])/(i[1]-e[1]);return!(a<t[0])}function dt(t,e){for(var i,a=0,o=0;o<e.length;o++){i=e[o][0],1==e.length&&(i=e[o][0]);for(var r=0;r<i.length-1;r++){var n=i[r],l=i[r+1];ct(t,n,l)&&(a+=1)}}return!(1!=a%2)}function xt(t,e,i,a,o,r,l){for(var s=Math.PI,h=0;h<t.length;h++){var c=void 0,d=void 0,x=void 0,p=void 0,g=t[h],u=g.format?g.format(+g._proportion_.toFixed(2)):n.toFixed(100*g._proportion_)+"%";"right"==o?(c=0==h?(g.funnelArea[2]+l.x)/2:(g.funnelArea[2]+t[h-1].funnelArea[2])/2,d=c+2*r,x=g.funnelArea[1]+a/2,p=g.textSize||e.fontSize,i.setLineWidth(1*e.pixelRatio),i.setStrokeStyle(g.color),i.setFillStyle(g.color),i.beginPath(),i.moveTo(c,x),i.lineTo(d,x),i.stroke(),i.closePath(),i.beginPath(),i.moveTo(d,x),i.arc(d,x,2,0,2*s),i.closePath(),i.fill(),i.beginPath(),i.setFontSize(p),i.setFillStyle(g.textColor||"#666666"),i.fillText(u,d+5,x+p/2-2),i.closePath(),i.stroke(),i.closePath()):(c=0==h?(g.funnelArea[0]+l.x)/2:(g.funnelArea[0]+t[h-1].funnelArea[0])/2,d=c-2*r,x=g.funnelArea[1]+a/2,p=g.textSize||e.fontSize,i.setLineWidth(1*e.pixelRatio),i.setStrokeStyle(g.color),i.setFillStyle(g.color),i.beginPath(),i.moveTo(c,x),i.lineTo(d,x),i.stroke(),i.closePath(),i.beginPath(),i.moveTo(d,x),i.arc(d,x,2,0,2*s),i.closePath(),i.fill(),i.beginPath(),i.setFontSize(p),i.setFillStyle(g.textColor||"#666666"),i.fillText(u,d-5-f(u),x+p/2-2),i.closePath(),i.stroke(),i.closePath())}}function pt(t,e){e.draw()}var gt={easeIn:function(t){return Math.pow(t,3)},easeOut:function(t){return Math.pow(t-1,3)+1},easeInOut:function(t){var e=Math.pow;return 1>(t/=.5)?.5*e(t,3):.5*(e(t-2,3)+2)},linear:function(t){return t}};function ft(t){this.isStop=!1,t.duration="undefined"==typeof t.duration?1e3:t.duration,t.timing=t.timing||"linear";var e=function(){return"undefined"==typeof setTimeout?"undefined"==typeof requestAnimationFrame?function(t){t(null)}:requestAnimationFrame:function(t,e){setTimeout((function(){var e=+new Date;t(e)}),e)}}(),i=null,a=function(o){if(null===o||!0===this.isStop)return t.onProcess&&t.onProcess(1),void(t.onAnimationFinish&&t.onAnimationFinish());if(null===i&&(i=o),o-i<t.duration){var r=(o-i)/t.duration,n=gt[t.timing];r=n(r),t.onProcess&&t.onProcess(r),e(a,17)}else t.onProcess&&t.onProcess(1),t.onAnimationFinish&&t.onAnimationFinish()};a=a.bind(this),e(a,17)}function ut(t,e,i,a){var o=this,s=e.series,h=e.categories;s=p(s,e,i);var x=e.animation?e.duration:0;o.animationInstance&&o.animationInstance.stop();var g=null;if("candle"==t){var u=r({},e.extra.candle.average);u.show?(g=function(t,e,i,a){for(var o,r=[],n=0;n<t.length;n++){o={data:[],name:e[n],color:i[n]};for(var l=0,s=a.length;l<s;l++)if(l<t[n])o.data.push(null);else{for(var h=0,c=0;c<t[n];c++)h+=a[l-c][1];o.data.push(+(h/t[n]).toFixed(3))}r.push(o)}return r}(u.day,u.name,u.color,s[0].data),g=p(g,e,i),e.seriesMA=g):g=e.seriesMA?e.seriesMA=p(e.seriesMA,e,i):s}else g=s;e._series_=s=function(t){for(var e=[],i=0;i<t.length;i++)1==t[i].show&&e.push(t[i]);return e}(s),e.area=[,,,,];for(var y=0;4>y;y++)e.area[y]=e.padding[y];var v=function(t,e,i,a){var o=Math.max,r=Math.floor,n={area:{start:{x:0,y:0},end:{x:0,y:0},width:0,height:0,wholeWidth:0,wholeHeight:0},points:[],widthArr:[],heightArr:[]};if(!1===e.legend.show)return a.legendData=n,n;var l=e.legend.padding,s=e.legend.margin,h=e.legend.fontSize,c=15*e.pixelRatio,d=5*e.pixelRatio,x=o(e.legend.lineHeight*e.pixelRatio,h);if("top"==e.legend.position||"bottom"==e.legend.position){for(var p=[],g=0,u=[],y=[],v=0;v<t.length;v++){var m=t[v],b=c+d+f(m.name||"undefined",h)+e.legend.itemGap;g+b>e.width-e.padding[1]-e.padding[3]?(p.push(y),u.push(g-e.legend.itemGap),g=b,y=[m]):(g+=b,y.push(m))}if(y.length){p.push(y),u.push(g-e.legend.itemGap),n.widthArr=u;var A=o.apply(null,u);switch(e.legend.float){case"left":n.area.start.x=e.padding[3],n.area.end.x=e.padding[3]+2*l;break;case"right":n.area.start.x=e.width-e.padding[1]-A-2*l,n.area.end.x=e.width-e.padding[1];break;default:n.area.start.x=(e.width-A)/2-l,n.area.end.x=(e.width+A)/2+l}n.area.width=A+2*l,n.area.wholeWidth=A+2*l,n.area.height=p.length*x+2*l,n.area.wholeHeight=p.length*x+2*l+2*s,n.points=p}}else{var S=t.length,T=e.height-e.padding[0]-e.padding[2]-2*s-2*l,P=Math.min(r(T/x),S);switch(n.area.height=P*x+2*l,n.area.wholeHeight=P*x+2*l,e.legend.float){case"top":n.area.start.y=e.padding[0]+s,n.area.end.y=e.padding[0]+s+n.area.height;break;case"bottom":n.area.start.y=e.height-e.padding[2]-s-n.area.height,n.area.end.y=e.height-e.padding[2]-s;break;default:n.area.start.y=(e.height-n.area.height)/2,n.area.end.y=(e.height+n.area.height)/2}for(var w,_=0==S%P?S/P:r(S/P+1),L=[],F=0;F<_;F++)w=t.slice(F*P,F*P+P),L.push(w);if(n.points=L,L.length){for(var D=0;D<L.length;D++){for(var R,k=L[D],C=0,M=0;M<k.length;M++)R=c+d+f(k[M].name||"undefined",h)+e.legend.itemGap,R>C&&(C=R);n.widthArr.push(C),n.heightArr.push(k.length*x+2*l)}for(var z=0,W=0;W<n.widthArr.length;W++)z+=n.widthArr[W];n.area.width=z-e.legend.itemGap+2*l,n.area.wholeWidth=n.area.width+l}}switch(e.legend.position){case"top":n.area.start.y=e.padding[0]+s,n.area.end.y=e.padding[0]+s+n.area.height;break;case"bottom":n.area.start.y=e.height-e.padding[2]-n.area.height-s,n.area.end.y=e.height-e.padding[2]-s;break;case"left":n.area.start.x=e.padding[3],n.area.end.x=e.padding[3]+n.area.width;break;case"right":n.area.start.x=e.width-e.padding[1]-n.area.width,n.area.end.x=e.width-e.padding[1]}return a.legendData=n,n}(g,e,0,e.chartData),m=v.area.wholeHeight,S=v.area.wholeWidth;switch(e.legend.position){case"top":e.area[0]+=m;break;case"bottom":e.area[2]+=m;break;case"left":e.area[3]+=S;break;case"right":e.area[1]+=S}var T={},P=0;if("line"===e.type||"column"===e.type||"area"===e.type||"mix"===e.type||"candle"===e.type){if(T=J(s,e,i),P=T.yAxisWidth,e.yAxis.showTitle){for(var w=0,_=0;_<e.yAxis.data.length;_++)w=Math.max(w,e.yAxis.data[_].titleFontSize?e.yAxis.data[_].titleFontSize:i.fontSize);e.area[0]+=(w+6)*e.pixelRatio}for(var j=0,et=0,ct=0;ct<P.length;ct++)"left"==P[ct].position?(e.area[3]+=0<et?P[ct].width+e.yAxis.padding:P[ct].width,et+=1):(e.area[1]+=0<j?P[ct].width+e.yAxis.padding:P[ct].width,j+=1)}else i.yAxisWidth=P;if(e.chartData.yAxisData=T,e.categories&&e.categories.length){e.chartData.xAxisData=H(e.categories,e);var dt=F(e.categories,e,i,e.chartData.xAxisData.eachSpacing),gt=dt.xAxisHeight,ut=dt.angle;i.xAxisHeight=gt,i._xAxisTextAngle_=ut,e.area[2]+=gt,e.chartData.categoriesData=dt}else if("line"===e.type||"area"===e.type||"points"===e.type){e.chartData.xAxisData=D(s,e,i),h=e.chartData.xAxisData.rangesFormat;var yt=F(h,e,i,e.chartData.xAxisData.eachSpacing),vt=yt.xAxisHeight,mt=yt.angle;i.xAxisHeight=vt,i._xAxisTextAngle_=mt,e.area[2]+=vt,e.chartData.categoriesData=yt}else e.chartData.xAxisData={xAxisPoints:[]};if(e.enableScroll&&"right"==e.xAxis.scrollAlign&&void 0===e._scrollDistance_){var bt,At=e.chartData.xAxisData.xAxisPoints,St=e.chartData.xAxisData.startX,Tt=e.chartData.xAxisData.endX,Pt=e.chartData.xAxisData.eachSpacing,wt=Pt*(At.length-1);bt=Tt-St-wt,o.scrollOption={currentOffset:bt,startTouchX:bt,distance:0,lastMoveTime:0},e._scrollDistance_=bt}switch(("pie"===t||"ring"===t||"rose"===t)&&(i._pieTextMaxLength_=!1===e.dataLabel?0:function(t){t=k(t);for(var e=0,i=0;i<t.length;i++){var a=t[i],o=a.format?a.format(+a._proportion_.toFixed(2)):n.toFixed(100*a._proportion_)+"%";e=Math.max(e,f(o))}return e}(g)),t){case"word":var _t=r({},{type:"normal",autoColors:!0},e.extra.word);(1==e.updateData||null==e.updateData)&&(e.chartData.wordCloudData=function(t,e){var i=t.series.sort((function(t,e){return parseInt(e.textSize)-parseInt(t.textSize)}));switch(e){case"normal":for(var a=0;a<i.length;a++){for(var o=void 0,r=void 0,n=void 0,l=i[a].name,s=i[a].textSize,h=f(l,s),c=0;;){c++,o=lt(-t.width/2,t.width/2,5)-h/2,r=lt(-t.height/2,t.height/2,5)+s/2,n=[o-5+t.width/2,r-5-s+t.height/2,o+h+5+t.width/2,r+5+t.height/2];var d=st(n,i,t.width,t.height);if(!d)break;if(1e3==c){n=[-100,-100,-100,-100];break}}i[a].area=n}break;case"vertical":for(var x=function(){return!!(.7<Math.random())},p=0;p<i.length;p++){for(var g=void 0,u=void 0,y=void 0,v=void 0,m=i[p].name,b=i[p].textSize,A=f(m,b),S=x(),T=0;;){T++;var P=void 0;if(S?(g=lt(-t.width/2,t.width/2,5)-A/2,u=lt(-t.height/2,t.height/2,5)+b/2,y=[u-5-A+t.width/2,-g-5+t.height/2,u+5+t.width/2,-g+b+5+t.height/2],v=[t.width-(t.width/2-t.height/2)-(-g+b+5+t.height/2)-5,t.height/2-t.width/2+(u-5-A+t.width/2)-5,t.width-(t.width/2-t.height/2)-(-g+b+5+t.height/2)+b,t.height/2-t.width/2+(u-5-A+t.width/2)+A+5],P=st(v,i,t.height,t.width)):(g=lt(-t.width/2,t.width/2,5)-A/2,u=lt(-t.height/2,t.height/2,5)+b/2,y=[g-5+t.width/2,u-5-b+t.height/2,g+A+5+t.width/2,u+5+t.height/2],P=st(y,i,t.width,t.height)),!P)break;if(1e3==T){y=[-1e3,-1e3,-1e3,-1e3];break}}S?(i[p].area=v,i[p].areav=y):i[p].area=y,i[p].rotate=S}}return i}(e,_t.type)),this.animationInstance=new ft({timing:"easeInOut",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),function(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1;r({},{type:"normal",autoColors:!0},e.extra.word),a.beginPath(),a.setFillStyle(e.background||"#FFFFFF"),a.rect(0,0,e.width,e.height),a.fill(),a.save();var n=e.chartData.wordCloudData;a.translate(e.width/2,e.height/2);for(var l=0;l<n.length;l++){a.save(),n[l].rotate&&a.rotate(90*Math.PI/180);var s=n[l].name,h=n[l].textSize,c=f(s,h);a.beginPath(),a.setStrokeStyle(n[l].color),a.setFillStyle(n[l].color),a.setFontSize(h),n[l].rotate?0<n[l].areav[0]&&(e.tooltip&&e.tooltip.index==l?a.strokeText(s,(n[l].areav[0]+5-e.width/2)*o-c*(1-o)/2,(n[l].areav[1]+5+h-e.height/2)*o):a.fillText(s,(n[l].areav[0]+5-e.width/2)*o-c*(1-o)/2,(n[l].areav[1]+5+h-e.height/2)*o)):0<n[l].area[0]&&(e.tooltip&&e.tooltip.index==l?a.strokeText(s,(n[l].area[0]+5-e.width/2)*o-c*(1-o)/2,(n[l].area[1]+5+h-e.height/2)*o):a.fillText(s,(n[l].area[0]+5-e.width/2)*o-c*(1-o)/2,(n[l].area[1]+5+h-e.height/2)*o)),a.stroke(),a.restore()}a.restore()}(s,e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"map":a.clearRect(0,0,e.width,e.height),function(t,e,i,a){var o,n,s=Math.abs,h=r({},{border:!0,borderWidth:1,borderColor:"#666666",fillOpacity:.6,activeBorderColor:"#f04864",activeFillColor:"#facc14",activeFillOpacity:1},e.extra.map),c=t,d=function(t){for(var e,i,a={xMin:180,xMax:0,yMin:90,yMax:0},o=0;o<t.length;o++){i=t[o].geometry.coordinates;for(var r=0;r<i.length;r++){e=i[r],1==e.length&&(e=e[0]);for(var n=0;n<e.length;n++){var l=e[n][0],s=e[n][1],h={x:l,y:s};a.xMin=a.xMin<h.x?a.xMin:h.x,a.xMax=a.xMax>h.x?a.xMax:h.x,a.yMin=a.yMin<h.y?a.yMin:h.y,a.yMax=a.yMax>h.y?a.yMax:h.y}}}return a}(c),x=e.width/s(d.xMax-d.xMin),p=e.height/s(d.yMax-d.yMin),g=x<p?x:p,u=e.width/2-s(d.xMax-d.xMin)/2*g,y=e.height/2-s(d.yMax-d.yMin)/2*g;a.beginPath(),a.clearRect(0,0,e.width,e.height),a.setFillStyle(e.background||"#FFFFFF"),a.rect(0,0,e.width,e.height),a.fill();for(var v=0;v<c.length;v++){a.beginPath(),a.setLineWidth(h.borderWidth*e.pixelRatio),a.setStrokeStyle(h.borderColor),a.setFillStyle(l(t[v].color,h.fillOpacity)),e.tooltip&&e.tooltip.index==v&&(a.setStrokeStyle(h.activeBorderColor),a.setFillStyle(l(h.activeFillColor,h.activeFillOpacity)));for(var m=c[v].geometry.coordinates,b=0;b<m.length;b++){o=m[b],1==o.length&&(o=o[0]);for(var A=0;A<o.length;A++)n=ht(o[A][1],o[A][0],d,g,u,y),0==A?(a.beginPath(),a.moveTo(n.x,n.y)):a.lineTo(n.x,n.y);a.fill(),1==h.border&&a.stroke()}if(1==e.dataLabel){var S=c[v].properties.centroid;if(S){n=ht(S[1],S[0],d,g,u,y);var T=c[v].textSize||i.fontSize,P=c[v].properties.name;a.beginPath(),a.setFontSize(T),a.setFillStyle(c[v].textColor||"#666666"),a.fillText(P,n.x-f(P,T)/2,n.y+T/2),a.closePath(),a.stroke()}}}e.chartData.mapData={bounds:d,scale:g,xoffset:u,yoffset:y},it(e,i,a,1),a.draw()}(s,e,i,a);break;case"funnel":this.animationInstance=new ft({timing:"easeInOut",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),e.chartData.funnelData=function(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=r({},{activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right"},e.extra.funnel),s=(e.height-e.area[0]-e.area[2])/t.length,h={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.height-e.area[2]},c=n.activeWidth,d=Math.min((e.width-e.area[1]-e.area[3])/2-c,(e.height-e.area[0]-e.area[2])/2-c);t=C(t,d,o),a.save(),a.translate(h.x,h.y);for(var x=0;x<t.length;x++)0==x?(e.tooltip&&e.tooltip.index==x&&(a.beginPath(),a.setFillStyle(l(t[x].color,n.activeOpacity)),a.moveTo(-c,0),a.lineTo(-t[x].radius-c,-s),a.lineTo(t[x].radius+c,-s),a.lineTo(c,0),a.lineTo(-c,0),a.closePath(),a.fill()),t[x].funnelArea=[h.x-t[x].radius,h.y-s,h.x+t[x].radius,h.y],a.beginPath(),a.setLineWidth(n.borderWidth*e.pixelRatio),a.setStrokeStyle(n.borderColor),a.setFillStyle(l(t[x].color,n.fillOpacity)),a.moveTo(0,0),a.lineTo(-t[x].radius,-s),a.lineTo(t[x].radius,-s),a.lineTo(0,0),a.closePath(),a.fill(),1==n.border&&a.stroke()):(e.tooltip&&e.tooltip.index==x&&(a.beginPath(),a.setFillStyle(l(t[x].color,n.activeOpacity)),a.moveTo(0,0),a.lineTo(-t[x-1].radius-c,0),a.lineTo(-t[x].radius-c,-s),a.lineTo(t[x].radius+c,-s),a.lineTo(t[x-1].radius+c,0),a.lineTo(0,0),a.closePath(),a.fill()),t[x].funnelArea=[h.x-t[x].radius,h.y-s*(x+1),h.x+t[x].radius,h.y-s*x],a.beginPath(),a.setLineWidth(n.borderWidth*e.pixelRatio),a.setStrokeStyle(n.borderColor),a.setFillStyle(l(t[x].color,n.fillOpacity)),a.moveTo(0,0),a.lineTo(-t[x-1].radius,0),a.lineTo(-t[x].radius,-s),a.lineTo(t[x].radius,-s),a.lineTo(t[x-1].radius,0),a.lineTo(0,0),a.closePath(),a.fill(),1==n.border&&a.stroke()),a.translate(0,-s);return a.restore(),!1!==e.dataLabel&&1===o&&xt(t,e,a,s,n.labelAlign,c,h),{center:h,radius:d,series:t}}(s,e,i,a,t),nt(e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"line":this.animationInstance=new ft({timing:"easeIn",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),ot(0,e,0,a),at(h,e,i,a);var o=function(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=r({},{type:"straight",width:2},e.extra.line);n.width*=e.pixelRatio;var l=e.chartData.xAxisData,s=l.xAxisPoints,h=l.eachSpacing,d=[];a.save();var x=0,p=e.width+h;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),x=-e._scrollDistance_-h+e.area[3],p=x+(e.xAxis.itemCount+4)*h),t.forEach((function(t){var r,l,g;r=[].concat(e.chartData.yAxisData.ranges[t.index]),l=r.pop(),g=r.shift();var f=t.data,u=X(f,l,g,s,h,e,i,o);d.push(u);var y=L(u);if("dash"==t.lineType){var v=t.dashLength?t.dashLength:8;v*=e.pixelRatio,a.setLineDash([v,v])}a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(n.width),y.forEach((function(t){if(1===t.length)a.moveTo(t[0].x,t[0].y),a.arc(t[0].x,t[0].y,1,0,2*Math.PI);else{a.moveTo(t[0].x,t[0].y);var e=0;if("curve"===n.type){for(var i,o=0;o<t.length;o++)if(i=t[o],0==e&&i.x>x&&(a.moveTo(i.x,i.y),e=1),0<o&&i.x>x&&i.x<p){var r=c(t,o-1);a.bezierCurveTo(r.ctrA.x,r.ctrA.y,r.ctrB.x,r.ctrB.y,i.x,i.y)}}else for(var l,s=0;s<t.length;s++)l=t[s],0==e&&l.x>x&&(a.moveTo(l.x,l.y),e=1),0<s&&l.x>x&&l.x<p&&a.lineTo(l.x,l.y);a.moveTo(t[0].x,t[0].y)}})),a.stroke(),a.setLineDash([]),!1!==e.dataPointShape&&$(u,t.color,t.pointShape,a,e)})),!1!==e.dataLabel&&1===o&&t.forEach((function(t){var r,n,l;r=[].concat(e.chartData.yAxisData.ranges[t.index]),n=r.pop(),l=r.shift();var c=t.data,d=X(c,n,l,s,h,e,i,o);Z(d,t,i,a)})),a.restore(),{xAxisPoints:s,calPoints:d,eachSpacing:h}}(s,e,i,a,t),n=o.xAxisPoints,l=o.calPoints,d=o.eachSpacing;e.chartData.xAxisPoints=n,e.chartData.calPoints=l,e.chartData.eachSpacing=d,rt(0,e,i,a),!1!==e.enableMarkLine&&1===t&&V(e,i,a),nt(e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"mix":this.animationInstance=new ft({timing:"easeIn",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),ot(0,e,0,a),at(h,e,i,a);var o=function(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,r=e.chartData.xAxisData,n=r.xAxisPoints,s=r.eachSpacing,h=e.height-e.area[2],d=[],x=0,p=0;t.forEach((function(t){"column"==t.type&&(p+=1)})),a.save();var g=-2,f=n.length+2,u=0,y=e.width+s;if(e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),g=Math.floor(-e._scrollDistance_/s)-2,f=g+e.xAxis.itemCount+4,u=-e._scrollDistance_-s+e.area[3],y=u+(e.xAxis.itemCount+4)*s),t.forEach((function(t){var r,v,m;r=[].concat(e.chartData.yAxisData.ranges[t.index]),v=r.pop(),m=r.shift();var b=t.data,A=X(b,v,m,n,s,e,i,o);if(d.push(A),"column"==t.type){A=I(A,s,p,x,i,e);for(var S,T=0;T<A.length;T++)if(S=A[T],null!==S&&T>g&&T<f){a.beginPath(),a.setStrokeStyle(S.color||t.color),a.setLineWidth(1),a.setFillStyle(S.color||t.color);var P=S.x-S.width/2;e.height,S.y,e.area[2];a.moveTo(P,S.y),a.moveTo(P,S.y),a.lineTo(P+S.width-2,S.y),a.lineTo(P+S.width-2,e.height-e.area[2]),a.lineTo(P,e.height-e.area[2]),a.lineTo(P,S.y),a.closePath(),a.stroke(),a.fill(),a.closePath(),a.fill()}x+=1}if("area"==t.type)for(var w,_=L(A),F=0;F<_.length;F++){if(w=_[F],a.beginPath(),a.setStrokeStyle(t.color),a.setFillStyle(l(t.color,.2)),a.setLineWidth(2*e.pixelRatio),1<w.length){var D=w[0],R=w[w.length-1];a.moveTo(D.x,D.y);var k=0;if("curve"===t.style){for(var C,M=0;M<w.length;M++)if(C=w[M],0==k&&C.x>u&&(a.moveTo(C.x,C.y),k=1),0<M&&C.x>u&&C.x<y){var z=c(w,M-1);a.bezierCurveTo(z.ctrA.x,z.ctrA.y,z.ctrB.x,z.ctrB.y,C.x,C.y)}}else for(var W,O=0;O<w.length;O++)W=w[O],0==k&&W.x>u&&(a.moveTo(W.x,W.y),k=1),0<O&&W.x>u&&W.x<y&&a.lineTo(W.x,W.y);a.lineTo(R.x,h),a.lineTo(D.x,h),a.lineTo(D.x,D.y)}else{var E=w[0];a.moveTo(E.x-s/2,E.y),a.lineTo(E.x+s/2,E.y),a.lineTo(E.x+s/2,h),a.lineTo(E.x-s/2,h),a.moveTo(E.x-s/2,E.y)}a.closePath(),a.fill()}if("line"==t.type){var B=L(A);B.forEach((function(i){if("dash"==t.lineType){var o=t.dashLength?t.dashLength:8;o*=e.pixelRatio,a.setLineDash([o,o])}if(a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(2*e.pixelRatio),1===i.length)a.moveTo(i[0].x,i[0].y),a.arc(i[0].x,i[0].y,1,0,2*Math.PI);else{a.moveTo(i[0].x,i[0].y);var r=0;if("curve"==t.style){for(var n,l=0;l<i.length;l++)if(n=i[l],0==r&&n.x>u&&(a.moveTo(n.x,n.y),r=1),0<l&&n.x>u&&n.x<y){var s=c(i,l-1);a.bezierCurveTo(s.ctrA.x,s.ctrA.y,s.ctrB.x,s.ctrB.y,n.x,n.y)}}else for(var h,d=0;d<i.length;d++)h=i[d],0==r&&h.x>u&&(a.moveTo(h.x,h.y),r=1),0<d&&h.x>u&&h.x<y&&a.lineTo(h.x,h.y);a.moveTo(i[0].x,i[0].y)}a.stroke(),a.setLineDash([])}))}"point"==t.type&&(t.addPoint=!0),1==t.addPoint&&"column"!==t.type&&$(A,t.color,t.pointShape,a,e)})),!1!==e.dataLabel&&1===o){x=0;t.forEach((function(t){var r,l,h;r=[].concat(e.chartData.yAxisData.ranges[t.index]),l=r.pop(),h=r.shift();var c=t.data,d=X(c,l,h,n,s,e,i,o);"column"===t.type?(d=I(d,s,p,x,i,e),Z(d,t,i,a),x+=1):Z(d,t,i,a)}))}return a.restore(),{xAxisPoints:n,calPoints:d,eachSpacing:s}}(s,e,i,a,t),r=o.xAxisPoints,n=o.calPoints,d=o.eachSpacing;e.chartData.xAxisPoints=r,e.chartData.calPoints=n,e.chartData.eachSpacing=d,rt(0,e,i,a),!1!==e.enableMarkLine&&1===t&&V(e,i,a),nt(e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"column":this.animationInstance=new ft({timing:"easeIn",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),ot(0,e,0,a),at(h,e,i,a);var o=function(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=e.chartData.xAxisData,l=n.xAxisPoints,s=n.eachSpacing,h=r({},{type:"group",width:s/2,meter:{border:4,fillColor:"#FFFFFF"}},e.extra.column),c=[];a.save();var d=-2,x=l.length+2;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),d=Math.floor(-e._scrollDistance_/s)-2,x=d+e.xAxis.itemCount+4),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===o&&tt(e.tooltip.offset.x,e,0,a,s),t.forEach((function(r,n){var p,g,f;p=[].concat(e.chartData.yAxisData.ranges[r.index]),g=p.pop(),f=p.shift();var u=r.data;switch(h.type){case"group":var y=X(u,g,f,l,s,e,i,o),v=G(u,g,f,l,s,e,i,n,t,o);c.push(v),y=I(y,s,t.length,n,i,e);for(var m,b=0;b<y.length;b++)if(m=y[b],null!==m&&b>d&&b<x){a.beginPath(),a.setStrokeStyle(m.color||r.color),a.setLineWidth(1),a.setFillStyle(m.color||r.color);var A=m.x-m.width/2,S=e.height-m.y-e.area[2];a.moveTo(A,m.y),a.lineTo(A+m.width-2,m.y),a.lineTo(A+m.width-2,e.height-e.area[2]),a.lineTo(A,e.height-e.area[2]),a.lineTo(A,m.y),a.closePath(),a.stroke(),a.fill()}break;case"stack":y=G(u,g,f,l,s,e,i,n,t,o);c.push(y),y=B(y,s,t.length,0,i,e);for(var T,P=0;P<y.length;P++)if(T=y[P],null!==T&&P>d&&P<x){a.beginPath(),a.setFillStyle(T.color||r.color);A=T.x-T.width/2+1,S=e.height-T.y-e.area[2];var w=e.height-T.y0-e.area[2];0<n&&(S-=w),a.moveTo(A,T.y),a.fillRect(A,T.y,T.width-2,S),a.closePath(),a.fill()}break;case"meter":y=X(u,g,f,l,s,e,i,o);if(c.push(y),y=E(y,s,t.length,n,i,e,h.meter.border),0==n){for(var _,L=0;L<y.length;L++)if(_=y[L],null!==_&&L>d&&L<x){a.beginPath(),a.setFillStyle(h.meter.fillColor);A=_.x-_.width/2,S=e.height-_.y-e.area[2];a.moveTo(A,_.y),a.fillRect(A,_.y,_.width,S),a.closePath(),a.fill(),0<h.meter.border&&(a.beginPath(),a.setStrokeStyle(r.color),a.setLineWidth(h.meter.border*e.pixelRatio),a.moveTo(A+.5*h.meter.border,_.y+S),a.lineTo(A+.5*h.meter.border,_.y+.5*h.meter.border),a.lineTo(A+_.width-.5*h.meter.border,_.y+.5*h.meter.border),a.lineTo(A+_.width-.5*h.meter.border,_.y+S),a.stroke())}}else for(var F,D=0;D<y.length;D++)if(F=y[D],null!==F&&D>d&&D<x){a.beginPath(),a.setFillStyle(F.color||r.color);A=F.x-F.width/2,S=e.height-F.y-e.area[2];a.moveTo(A,F.y),a.fillRect(A,F.y,F.width,S),a.closePath(),a.fill()}}})),!1!==e.dataLabel&&1===o&&t.forEach((function(r,n){var c,d,x;c=[].concat(e.chartData.yAxisData.ranges[r.index]),d=c.pop(),x=c.shift();var p=r.data;switch(h.type){case"group":var g=X(p,d,x,l,s,e,i,o);g=I(g,s,t.length,n,i,e),Z(g,r,i,a);break;case"stack":g=G(p,d,x,l,s,e,i,n,t,o);Z(g,r,i,a);break;case"meter":g=X(p,d,x,l,s,e,i,o);Z(g,r,i,a)}})),a.restore(),{xAxisPoints:l,calPoints:c,eachSpacing:s}}(s,e,i,a,t),n=o.xAxisPoints,l=o.calPoints,c=o.eachSpacing;e.chartData.xAxisPoints=n,e.chartData.calPoints=l,e.chartData.eachSpacing=c,rt(0,e,i,a),!1!==e.enableMarkLine&&1===t&&V(e,i,a),nt(e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"area":this.animationInstance=new ft({timing:"easeIn",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),ot(0,e,0,a),at(h,e,i,a);var o=function(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=r({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1},e.extra.area),s=e.chartData.xAxisData,h=s.xAxisPoints,d=s.eachSpacing,x=e.height-e.area[2],p=[];a.save();var g=0,f=e.width+d;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),g=-e._scrollDistance_-d+e.area[3],f=g+(e.xAxis.itemCount+4)*d),t.forEach((function(t){var r,s,u;r=[].concat(e.chartData.yAxisData.ranges[t.index]),s=r.pop(),u=r.shift();var y=t.data,v=X(y,s,u,h,d,e,i,o);p.push(v);for(var m,b=L(v),A=0;A<b.length;A++){if(m=b[A],a.beginPath(),a.setStrokeStyle(l(t.color,n.opacity)),n.gradient){var S=a.createLinearGradient(0,e.area[0],0,e.height-e.area[2]);S.addColorStop("0",l(t.color,n.opacity)),S.addColorStop("1.0",l("#FFFFFF",.1)),a.setFillStyle(S)}else a.setFillStyle(l(t.color,n.opacity));if(a.setLineWidth(n.width*e.pixelRatio),1<m.length){var T=m[0],P=m[m.length-1];a.moveTo(T.x,T.y);var w=0;if("curve"===n.type){for(var _,F=0;F<m.length;F++)if(_=m[F],0==w&&_.x>g&&(a.moveTo(_.x,_.y),w=1),0<F&&_.x>g&&_.x<f){var D=c(m,F-1);a.bezierCurveTo(D.ctrA.x,D.ctrA.y,D.ctrB.x,D.ctrB.y,_.x,_.y)}}else for(var R,k=0;k<m.length;k++)R=m[k],0==w&&R.x>g&&(a.moveTo(R.x,R.y),w=1),0<k&&R.x>g&&R.x<f&&a.lineTo(R.x,R.y);a.lineTo(P.x,x),a.lineTo(T.x,x),a.lineTo(T.x,T.y)}else{var C=m[0];a.moveTo(C.x-d/2,C.y),a.lineTo(C.x+d/2,C.y),a.lineTo(C.x+d/2,x),a.lineTo(C.x-d/2,x),a.moveTo(C.x-d/2,C.y)}if(a.closePath(),a.fill(),n.addLine){if("dash"==t.lineType){var M=t.dashLength?t.dashLength:8;M*=e.pixelRatio,a.setLineDash([M,M])}if(a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(n.width*e.pixelRatio),1===m.length)a.moveTo(m[0].x,m[0].y),a.arc(m[0].x,m[0].y,1,0,2*Math.PI);else{a.moveTo(m[0].x,m[0].y);var z=0;if("curve"===n.type){for(var W,O=0;O<m.length;O++)if(W=m[O],0==z&&W.x>g&&(a.moveTo(W.x,W.y),z=1),0<O&&W.x>g&&W.x<f){var I=c(m,O-1);a.bezierCurveTo(I.ctrA.x,I.ctrA.y,I.ctrB.x,I.ctrB.y,W.x,W.y)}}else for(var E,B=0;B<m.length;B++)E=m[B],0==z&&E.x>g&&(a.moveTo(E.x,E.y),z=1),0<B&&E.x>g&&E.x<f&&a.lineTo(E.x,E.y);a.moveTo(m[0].x,m[0].y)}a.stroke(),a.setLineDash([])}}!1!==e.dataPointShape&&$(v,t.color,t.pointShape,a,e)})),!1!==e.dataLabel&&1===o&&t.forEach((function(t){var r,n,l;r=[].concat(e.chartData.yAxisData.ranges[t.index]),n=r.pop(),l=r.shift();var s=t.data,c=X(s,n,l,h,d,e,i,o);Z(c,t,i,a)})),a.restore(),{xAxisPoints:h,calPoints:p,eachSpacing:d}}(s,e,i,a,t),n=o.xAxisPoints,d=o.calPoints,x=o.eachSpacing;e.chartData.xAxisPoints=n,e.chartData.calPoints=d,e.chartData.eachSpacing=x,rt(0,e,i,a),!1!==e.enableMarkLine&&1===t&&V(e,i,a),nt(e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"ring":case"pie":this.animationInstance=new ft({timing:"easeInOut",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),e.chartData.pieData=function(t,e,i,a){var o=Math.PI,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,s=r({},{activeOpacity:.5,activeRadius:10*e.pixelRatio,offsetAngle:0,labelWidth:15*e.pixelRatio,ringWidth:0,border:!1,borderWidth:2,borderColor:"#FFFFFF"},e.extra.pie),h={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2};0==i.pieChartLinePadding&&(i.pieChartLinePadding=s.activeRadius);var c=Math.min((e.width-e.area[1]-e.area[3])/2-i.pieChartLinePadding-i.pieChartTextPadding-i._pieTextMaxLength_,(e.height-e.area[0]-e.area[2])/2-i.pieChartLinePadding-i.pieChartTextPadding);t=k(t,c,n);var d=s.activeRadius;if(t=t.map((function(t){return t._start_+=s.offsetAngle*o/180,t})),t.forEach((function(t,i){e.tooltip&&e.tooltip.index==i&&(a.beginPath(),a.setFillStyle(l(t.color,e.extra.pie.activeOpacity||.5)),a.moveTo(h.x,h.y),a.arc(h.x,h.y,t._radius_+d,t._start_,t._start_+2*t._proportion_*o),a.closePath(),a.fill()),a.beginPath(),a.setLineWidth(s.borderWidth*e.pixelRatio),a.lineJoin="round",a.setStrokeStyle(s.borderColor),a.setFillStyle(t.color),a.moveTo(h.x,h.y),a.arc(h.x,h.y,t._radius_,t._start_,t._start_+2*t._proportion_*o),a.closePath(),a.fill(),1==s.border&&a.stroke()})),"ring"===e.type){var x=.6*c;"number"==typeof e.extra.pie.ringWidth&&0<e.extra.pie.ringWidth&&(x=Math.max(0,c-e.extra.pie.ringWidth)),a.beginPath(),a.setFillStyle(e.background||"#ffffff"),a.moveTo(h.x,h.y),a.arc(h.x,h.y,x,0,2*o),a.closePath(),a.fill()}if(!1!==e.dataLabel&&1===n){for(var p=!1,g=0,f=t.length;g<f;g++)if(0<t[g].data){p=!0;break}p&&U(t,e,i,a,0,h)}return 1===n&&"ring"===e.type&&q(e,i,a,h),{center:h,radius:c,series:t}}(s,e,i,a,t),nt(e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"rose":this.animationInstance=new ft({timing:"easeInOut",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),e.chartData.pieData=function(t,e,i,a){var o=Math.PI,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,s=r({},{type:"area",activeOpacity:.5,activeRadius:10*e.pixelRatio,offsetAngle:0,labelWidth:15*e.pixelRatio,border:!1,borderWidth:2,borderColor:"#FFFFFF"},e.extra.rose);0==i.pieChartLinePadding&&(i.pieChartLinePadding=s.activeRadius);var h={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2},c=Math.min((e.width-e.area[1]-e.area[3])/2-i.pieChartLinePadding-i.pieChartTextPadding-i._pieTextMaxLength_,(e.height-e.area[0]-e.area[2])/2-i.pieChartLinePadding-i.pieChartTextPadding),d=s.minRadius||.5*c;t=M(t,s.type,d,c,n);var x=s.activeRadius;if(t=t.map((function(t){return t._start_+=(s.offsetAngle||0)*o/180,t})),t.forEach((function(t,i){e.tooltip&&e.tooltip.index==i&&(a.beginPath(),a.setFillStyle(l(t.color,s.activeOpacity||.5)),a.moveTo(h.x,h.y),a.arc(h.x,h.y,x+t._radius_,t._start_,t._start_+2*t._rose_proportion_*o),a.closePath(),a.fill()),a.beginPath(),a.setLineWidth(s.borderWidth*e.pixelRatio),a.lineJoin="round",a.setStrokeStyle(s.borderColor),a.setFillStyle(t.color),a.moveTo(h.x,h.y),a.arc(h.x,h.y,t._radius_,t._start_,t._start_+2*t._rose_proportion_*o),a.closePath(),a.fill(),1==s.border&&a.stroke()})),!1!==e.dataLabel&&1===n){for(var p=!1,g=0,f=t.length;g<f;g++)if(0<t[g].data){p=!0;break}p&&U(t,e,i,a,0,h)}return{center:h,radius:c,series:t}}(s,e,i,a,t),nt(e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"radar":this.animationInstance=new ft({timing:"easeInOut",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),e.chartData.radarData=function(t,e,i,a){var o=Math.cos,n=Math.sin,s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,h=r({},{gridColor:"#cccccc",labelColor:"#666666",opacity:.2,gridCount:3},e.extra.radar),c=A(e.categories.length),x={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2},p=Math.min(x.x-(b(e.categories)+i.radarLabelTextMargin),x.y-i.radarLabelTextMargin);p-=e.padding[1],a.beginPath(),a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(h.gridColor),c.forEach((function(t){var e=d(p*o(t),p*n(t),x);a.moveTo(x.x,x.y),a.lineTo(e.x,e.y)})),a.stroke(),a.closePath();for(var g=function(t){var i={};a.beginPath(),a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(h.gridColor),c.forEach((function(e,r){var l=d(p/h.gridCount*t*o(e),p/h.gridCount*t*n(e),x);0===r?(i=l,a.moveTo(l.x,l.y)):a.lineTo(l.x,l.y)})),a.lineTo(i.x,i.y),a.stroke(),a.closePath()},f=1;f<=h.gridCount;f++)g(f);var u=R(c,x,p,t,e,s);return u.forEach((function(t){if(a.beginPath(),a.setFillStyle(l(t.color,h.opacity)),t.data.forEach((function(t,e){0===e?a.moveTo(t.position.x,t.position.y):a.lineTo(t.position.x,t.position.y)})),a.closePath(),a.fill(),!1!==e.dataPointShape){var i=t.data.map((function(t){return t.position}));$(i,t.color,t.pointShape,a,e)}})),Q(c,p,x,e,i,a),{center:x,radius:p,angleList:c}}(s,e,i,a,t),nt(e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new ft({timing:"easeInOut",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),e.chartData.arcbarData=function(t,e,i,a){var o=Math.PI,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,l=r({},{startAngle:.75,endAngle:.25,type:"default",width:12*e.pixelRatio,gap:2*e.pixelRatio},e.extra.arcbar);t=z(t,l,n);var s,h=l.center?l.center:{x:e.width/2,y:e.height/2};l.radius?s=l.radius:(s=Math.min(h.x,h.y),s-=5*e.pixelRatio,s-=l.width/2);for(var c,d=0;d<t.length;d++)c=t[d],a.setLineWidth(l.width),a.setStrokeStyle(l.backgroundColor||"#E9E9E9"),a.setLineCap("round"),a.beginPath(),"default"==l.type?a.arc(h.x,h.y,s-(l.width+l.gap)*d,l.startAngle*o,l.endAngle*o,!1):a.arc(h.x,h.y,s-(l.width+l.gap)*d,0,2*o,!1),a.stroke(),a.setLineWidth(l.width),a.setStrokeStyle(c.color),a.setLineCap("round"),a.beginPath(),a.arc(h.x,h.y,s-(l.width+l.gap)*d,l.startAngle*o,c._proportion_*o,!1),a.stroke();return q(e,i,a,h),{center:h,radius:s,series:t}}(s,e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new ft({timing:"easeInOut",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),e.chartData.gaugeData=function(t,e,i,a,o){var n=Math.PI,s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,h=r({},{type:"default",startAngle:.75,endAngle:.25,width:15,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},i.extra.gauge);null==h.oldAngle&&(h.oldAngle=h.startAngle),null==h.oldData&&(h.oldData=0),t=W(t,h.startAngle,h.endAngle);var c={x:i.width/2,y:i.height/2},d=Math.min(c.x,c.y);d-=5*i.pixelRatio,d-=h.width/2;var x=d-h.width,p=0;if("progress"==h.type){var g=d-3*h.width;o.beginPath();var f=o.createLinearGradient(c.x,c.y-g,c.x,c.y+g);f.addColorStop("0",l(e[0].color,.3)),f.addColorStop("1.0",l("#FFFFFF",.1)),o.setFillStyle(f),o.arc(c.x,c.y,g,0,2*n,!1),o.fill(),o.setLineWidth(h.width),o.setStrokeStyle(l(e[0].color,.3)),o.setLineCap("round"),o.beginPath(),o.arc(c.x,c.y,x,h.startAngle*n,h.endAngle*n,!1),o.stroke(),p=h.startAngle-h.endAngle+1;h.splitLine.splitNumber;var u=p/h.splitLine.splitNumber/h.splitLine.childNumber,y=-d-.5*h.width-h.splitLine.fixRadius,v=-d-h.width-h.splitLine.fixRadius+h.splitLine.width;o.save(),o.translate(c.x,c.y),o.rotate((h.startAngle-1)*n);for(var m=h.splitLine.splitNumber*h.splitLine.childNumber+1,b=e[0].data*s,A=0;A<m;A++)o.beginPath(),b>A/m?o.setStrokeStyle(l(e[0].color,1)):o.setStrokeStyle(l(e[0].color,.3)),o.setLineWidth(3*i.pixelRatio),o.moveTo(y,0),o.lineTo(v,0),o.stroke(),o.rotate(u*n);o.restore(),e=z(e,h,s),o.setLineWidth(h.width),o.setStrokeStyle(e[0].color),o.setLineCap("round"),o.beginPath(),o.arc(c.x,c.y,x,h.startAngle*n,e[0]._proportion_*n,!1),o.stroke();var S=d-2.5*h.width;o.save(),o.translate(c.x,c.y),o.rotate((e[0]._proportion_-1)*n),o.beginPath(),o.setLineWidth(h.width/3);var T=o.createLinearGradient(0,.6*-S,0,.6*S);T.addColorStop("0",l("#FFFFFF",0)),T.addColorStop("0.5",l(e[0].color,1)),T.addColorStop("1.0",l("#FFFFFF",0)),o.setStrokeStyle(T),o.arc(0,0,S,.85*n,1.15*n,!1),o.stroke(),o.beginPath(),o.setLineWidth(1),o.setStrokeStyle(e[0].color),o.setFillStyle(e[0].color),o.moveTo(-S-h.width/3/2,-4),o.lineTo(-S-h.width/3/2-4,0),o.lineTo(-S-h.width/3/2,4),o.lineTo(-S-h.width/3/2,-4),o.stroke(),o.fill(),o.restore()}else{o.setLineWidth(h.width),o.setLineCap("butt");for(var P,w=0;w<t.length;w++)P=t[w],o.beginPath(),o.setStrokeStyle(P.color),o.arc(c.x,c.y,d,P._startAngle_*n,P._endAngle_*n,!1),o.stroke();o.save(),p=h.startAngle-h.endAngle+1;var _=p/h.splitLine.splitNumber,L=p/h.splitLine.splitNumber/h.splitLine.childNumber,F=-d-.5*h.width-h.splitLine.fixRadius,D=-d-.5*h.width-h.splitLine.fixRadius+h.splitLine.width,R=-d-.5*h.width-h.splitLine.fixRadius+h.splitLine.childWidth;o.translate(c.x,c.y),o.rotate((h.startAngle-1)*n);for(var k=0;k<h.splitLine.splitNumber+1;k++)o.beginPath(),o.setStrokeStyle(h.splitLine.color),o.setLineWidth(2*i.pixelRatio),o.moveTo(F,0),o.lineTo(D,0),o.stroke(),o.rotate(_*n);o.restore(),o.save(),o.translate(c.x,c.y),o.rotate((h.startAngle-1)*n);for(var C=0;C<h.splitLine.splitNumber*h.splitLine.childNumber+1;C++)o.beginPath(),o.setStrokeStyle(h.splitLine.color),o.setLineWidth(1*i.pixelRatio),o.moveTo(F,0),o.lineTo(R,0),o.stroke(),o.rotate(L*n);o.restore(),e=O(e,t,h,s);for(var M,I=0;I<e.length;I++)M=e[I],o.save(),o.translate(c.x,c.y),o.rotate((M._proportion_-1)*n),o.beginPath(),o.setFillStyle(M.color),o.moveTo(h.pointer.width,0),o.lineTo(0,-h.pointer.width/2),o.lineTo(-x,0),o.lineTo(0,h.pointer.width/2),o.lineTo(h.pointer.width,0),o.closePath(),o.fill(),o.beginPath(),o.setFillStyle("#FFFFFF"),o.arc(0,0,h.pointer.width/6,0,2*n,!1),o.fill(),o.restore();!1!==i.dataLabel&&K(h,d,c,0,a,o)}return q(i,a,o,c),1===s&&"gauge"===i.type&&(i.extra.gauge.oldAngle=e[0]._proportion_,i.extra.gauge.oldData=e[0].data),{center:c,radius:d,innerRadius:x,categories:t,totalAngle:p}}(h,s,e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"candle":this.animationInstance=new ft({timing:"easeIn",duration:x,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&Y(a,e),ot(0,e,0,a),at(h,e,i,a);var o=function(t,e,i,a,o){var n=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,l=r({},{color:{},average:{}},i.extra.candle);l.color=r({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},l.color),l.average=r({},{show:!1,name:[],day:[],color:a.colors},l.average),i.extra.candle=l;var s=i.chartData.xAxisData,h=s.xAxisPoints,d=s.eachSpacing,x=[];o.save();var p=-2,g=h.length+2,f=0,u=i.width+d;return i._scrollDistance_&&0!==i._scrollDistance_&&!0===i.enableScroll&&(o.translate(i._scrollDistance_,0),p=Math.floor(-i._scrollDistance_/d)-2,g=p+i.xAxis.itemCount+4,f=-i._scrollDistance_-d+i.area[3],u=f+(i.xAxis.itemCount+4)*d),l.average.show&&e.forEach((function(t){var e,r,l;e=[].concat(i.chartData.yAxisData.ranges[t.index]),r=e.pop(),l=e.shift();for(var s,x=t.data,p=X(x,r,l,h,d,i,a,n),g=L(p),y=0;y<g.length;y++){if(s=g[y],o.beginPath(),o.setStrokeStyle(t.color),o.setLineWidth(1),1===s.length)o.moveTo(s[0].x,s[0].y),o.arc(s[0].x,s[0].y,1,0,2*Math.PI);else{o.moveTo(s[0].x,s[0].y);for(var v,m=0,b=0;b<s.length;b++)if(v=s[b],0==m&&v.x>f&&(o.moveTo(v.x,v.y),m=1),0<b&&v.x>f&&v.x<u){var A=c(s,b-1);o.bezierCurveTo(A.ctrA.x,A.ctrA.y,A.ctrB.x,A.ctrB.y,v.x,v.y)}o.moveTo(s[0].x,s[0].y)}o.closePath(),o.stroke()}})),t.forEach((function(t){var e,r,s;e=[].concat(i.chartData.yAxisData.ranges[t.index]),r=e.pop(),s=e.shift();var c=t.data,f=N(c,r,s,h,d,i,a,n);x.push(f);for(var u=L(f),y=0;y<u[0].length;y++)if(y>p&&y<g){var v=u[0][y];o.beginPath(),0<c[y][1]-c[y][0]?(o.setStrokeStyle(l.color.upLine),o.setFillStyle(l.color.upFill),o.setLineWidth(1*i.pixelRatio),o.moveTo(v[3].x,v[3].y),o.lineTo(v[1].x,v[1].y),o.lineTo(v[1].x-d/4,v[1].y),o.lineTo(v[0].x-d/4,v[0].y),o.lineTo(v[0].x,v[0].y),o.lineTo(v[2].x,v[2].y),o.lineTo(v[0].x,v[0].y),o.lineTo(v[0].x+d/4,v[0].y),o.lineTo(v[1].x+d/4,v[1].y),o.lineTo(v[1].x,v[1].y),o.moveTo(v[3].x,v[3].y)):(o.setStrokeStyle(l.color.downLine),o.setFillStyle(l.color.downFill),o.setLineWidth(1*i.pixelRatio),o.moveTo(v[3].x,v[3].y),o.lineTo(v[0].x,v[0].y),o.lineTo(v[0].x-d/4,v[0].y),o.lineTo(v[1].x-d/4,v[1].y),o.lineTo(v[1].x,v[1].y),o.lineTo(v[2].x,v[2].y),o.lineTo(v[1].x,v[1].y),o.lineTo(v[1].x+d/4,v[1].y),o.lineTo(v[0].x+d/4,v[0].y),o.lineTo(v[0].x,v[0].y),o.moveTo(v[3].x,v[3].y)),o.closePath(),o.fill(),o.stroke()}})),o.restore(),{xAxisPoints:h,calPoints:x,eachSpacing:d}}(s,g,e,i,a,t),n=o.xAxisPoints,l=o.calPoints,d=o.eachSpacing;e.chartData.xAxisPoints=n,e.chartData.calPoints=l,e.chartData.eachSpacing=d,rt(0,e,i,a),!1!==e.enableMarkLine&&1===t&&V(e,i,a),nt(g?0:e.series,e,i,a,e.chartData),it(e,i,a,t),pt(0,a)},onAnimationFinish:function(){o.event.trigger("renderComplete")}})}}function yt(){this.events={}}ft.prototype.stop=function(){this.isStop=!0},yt.prototype.addEventListener=function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},yt.prototype.trigger=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];var a=e[0],o=e.slice(1);!this.events[a]||this.events[a].forEach((function(t){try{t.apply(null,o)}catch(e){console.error(e)}}))};var vt=function(e){e.pixelRatio=e.pixelRatio?e.pixelRatio:1,e.fontSize=e.fontSize?e.fontSize*e.pixelRatio:13*e.pixelRatio,e.title=r({},e.title),e.subtitle=r({},e.subtitle),e.duration=e.duration?e.duration:1e3,e.yAxis=r({},{data:[],showTitle:!1,disabled:!1,disableGrid:!1,splitNumber:5,gridType:"solid",dashLength:4*e.pixelRatio,gridColor:"#cccccc",padding:10,fontColor:"#666666"},e.yAxis),e.yAxis.dashLength*=e.pixelRatio,e.yAxis.padding*=e.pixelRatio,e.xAxis=r({},{rotateLabel:!1,type:"calibration",gridType:"solid",dashLength:4,scrollAlign:"left",boundaryGap:"center",axisLine:!0,axisLineColor:"#cccccc"},e.xAxis),e.xAxis.dashLength*=e.pixelRatio,e.legend=r({},{show:!0,position:"bottom",float:"center",backgroundColor:"rgba(0,0,0,0)",borderColor:"rgba(0,0,0,0)",borderWidth:0,padding:5,margin:5,itemGap:10,fontSize:e.fontSize,lineHeight:e.fontSize,fontColor:"#333333",format:{},hiddenColor:"#CECECE"},e.legend),e.legend.borderWidth*=e.pixelRatio,e.legend.itemGap*=e.pixelRatio,e.legend.padding*=e.pixelRatio,e.legend.margin*=e.pixelRatio,e.extra=r({},e.extra),e.rotate=!!e.rotate,e.animation=!!e.animation,e.rotate=!!e.rotate;var i=JSON.parse(JSON.stringify(o));if(i.colors=e.colors?e.colors:i.colors,i.yAxisTitleWidth=!0!==e.yAxis.disabled&&e.yAxis.title?i.yAxisTitleWidth:0,("pie"==e.type||"ring"==e.type)&&(i.pieChartLinePadding=!1===e.dataLabel?0:e.extra.pie.labelWidth*e.pixelRatio||i.pieChartLinePadding*e.pixelRatio),"rose"==e.type&&(i.pieChartLinePadding=!1===e.dataLabel?0:e.extra.rose.labelWidth*e.pixelRatio||i.pieChartLinePadding*e.pixelRatio),i.pieChartTextPadding=!1===e.dataLabel?0:i.pieChartTextPadding*e.pixelRatio,i.yAxisSplit=e.yAxis.splitNumber?e.yAxis.splitNumber:o.yAxisSplit,i.rotate=e.rotate,e.rotate){var a=e.width,n=e.height;e.width=n,e.height=a}e.padding=e.padding?e.padding:i.padding;for(var l=0;4>l;l++)e.padding[l]*=e.pixelRatio;i.yAxisWidth=o.yAxisWidth*e.pixelRatio,i.xAxisHeight=o.xAxisHeight*e.pixelRatio,e.enableScroll&&e.xAxis.scrollShow&&(i.xAxisHeight+=6*e.pixelRatio),i.xAxisLineHeight=o.xAxisLineHeight*e.pixelRatio,i.fontSize=e.fontSize,i.titleFontSize=o.titleFontSize*e.pixelRatio,i.subtitleFontSize=o.subtitleFontSize*e.pixelRatio,i.toolTipPadding=o.toolTipPadding*e.pixelRatio,i.toolTipLineHeight=o.toolTipLineHeight*e.pixelRatio,i.columePadding=o.columePadding*e.pixelRatio,e.$this=e.$this?e.$this:this,this.context=t.createCanvasContext(e.canvasId,e.$this),e.chartData={},this.event=new yt,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0},this.opts=e,this.config=i,ut.call(this,e.type,e,i,this.context)};vt.prototype.updateData=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.opts=r({},this.opts,t),this.opts.updateData=!0;var e=t.scrollPosition||"current";switch(e){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":var i=J(this.opts.series,this.opts,this.config),a=i.yAxisWidth;this.config.yAxisWidth=a;var o=0,n=H(this.opts.categories,this.opts,this.config),l=n.xAxisPoints,s=n.startX,h=n.endX,c=n.eachSpacing,d=c*(l.length-1);o=h-s-d,this.scrollOption={currentOffset:o,startTouchX:o,distance:0,lastMoveTime:0},this.opts._scrollDistance_=o}ut.call(this,this.opts.type,this.opts,this.config,this.context)},vt.prototype.zoom=function(){var t=Math.round,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0===this.opts.enableScroll){var i=t(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+t(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=e.itemCount;var a=J(this.opts.series,this.opts,this.config),o=a.yAxisWidth;this.config.yAxisWidth=o;var r=0,n=H(this.opts.categories,this.opts,this.config),l=n.xAxisPoints,s=n.startX,h=n.endX,c=n.eachSpacing,d=h-s,x=d-c*(l.length-1);r=d/2-c*i,0<r&&(r=0),r<x&&(r=x),this.scrollOption={currentOffset:r,startTouchX:r,distance:0,lastMoveTime:0},this.opts._scrollDistance_=r,ut.call(this,this.opts.type,this.opts,this.config,this.context)}else console.log("请启用滚动条后使用!")},vt.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()},vt.prototype.addEventListener=function(t,e){this.event.addEventListener(t,e)},vt.prototype.getCurrentDataIndex=function(t){var e;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var i=v(e,this.opts,t);return"pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type?function(t,e){var i=-1;if(_(t,e.center,e.radius)){var a=Math.atan2(e.center.y-t.y,t.x-e.center.x);a=-a;for(var o,r=0,n=e.series.length;r<n;r++)if(o=e.series[r],h(a,o._start_,o._start_+2*o._proportion_*Math.PI)){i=r;break}}return i}({x:i.x,y:i.y},this.opts.chartData.pieData):"radar"===this.opts.type?function(t,e,i){var a=Math.PI,o=2*a/i,r=-1;if(_(t,e.center,e.radius)){var n=function(t){return 0>t&&(t+=2*a),t>2*a&&(t-=2*a),t},l=Math.atan2(e.center.y-t.y,t.x-e.center.x);l*=-1,0>l&&(l+=2*a);var s=e.angleList.map((function(t){return t=n(-1*t),t}));s.forEach((function(t,e){var i=n(t-o/2),s=n(t+o/2);s<i&&(s+=2*a),(l>=i&&l<=s||l+2*a>=i&&l+2*a<=s)&&(r=e)}))}return r}({x:i.x,y:i.y},this.opts.chartData.radarData,this.opts.categories.length):"funnel"===this.opts.type?function(t,e){for(var i,a=-1,o=0,r=e.series.length;o<r;o++)if(i=e.series[o],t.x>i.funnelArea[0]&&t.x<i.funnelArea[2]&&t.y>i.funnelArea[1]&&t.y<i.funnelArea[3]){a=o;break}return a}({x:i.x,y:i.y},this.opts.chartData.funnelData):"map"===this.opts.type?function(t,e){for(var i,a=-1,o=e.chartData.mapData,r=e.series,n=function(t,e,i,a,o,r){return{x:(e-o)/a+i.xMin,y:i.yMax-(t-r)/a}}(t.y,t.x,o.bounds,o.scale,o.xoffset,o.yoffset),l=[n.x,n.y],s=0,h=r.length;s<h;s++)if(i=r[s].geometry.coordinates,dt(l,i)){a=s;break}return a}({x:i.x,y:i.y},this.opts):"word"===this.opts.type?function(t,e){for(var i,a=-1,o=0,r=e.length;o<r;o++)if(i=e[o],t.x>i.area[0]&&t.x<i.area[2]&&t.y>i.area[1]&&t.y<i.area[3]){a=o;break}return a}({x:i.x,y:i.y},this.opts.chartData.wordCloudData):function(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,r=-1,n=i.chartData.eachSpacing/2,l=[];if(0<e.length){if("candle"==i.type)for(var s=0;s<e[0].length;s++)l.push(e[0][s][0].x);else for(var h=0;h<e[0].length;h++)l.push(e[0][h].x);("line"==i.type||"area"==i.type)&&"justify"==i.xAxis.boundaryGap&&(n=i.chartData.eachSpacing/2),i.categories||(n=0),w(t,i)&&l.forEach((function(e,i){t.x+o+n>e&&(r=i)}))}return r}({x:i.x,y:i.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}return-1},vt.prototype.getLegendDataIndex=function(t){var e;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var i=v(e,this.opts,t);return function(t,e){var i=-1;if(function(t,e){return t.x>e.start.x&&t.x<e.end.x&&t.y>e.start.y&&t.y<e.end.y}(t,e.area)){for(var a,o=e.points,r=-1,n=0,l=o.length;n<l;n++){a=o[n];for(var s=0;s<a.length;s++){r+=1;var h=a[s].area;if(t.x>h[0]&&t.x<h[2]&&t.y>h[1]&&t.y<h[3]){i=r;break}}}return i}return i}({x:i.x,y:i.y},this.opts.chartData.legendData)}return-1},vt.prototype.touchLegend=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(i=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],i){v(i,this.opts,t);var a=this.getLegendDataIndex(t);0<=a&&(this.opts.series[a].show=!this.opts.series[a].show,this.opts.animation=!!e.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,ut.call(this,this.opts.type,this.opts,this.config,this.context))}},vt.prototype.showToolTip=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;i=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],i||console.log("touchError");var a=v(i,this.opts,t),o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1});if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type){var l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){var s=m(this.opts.series,l);if(0!==s.length){var h=S(s,this.opts.chartData.calPoints,l,this.opts.categories,e),c=h.textList,d=h.offset;d.y=a.y,n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}}ut.call(this,n.type,n,this.config,this.context)}if("mix"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=m(this.opts.series,l);if(0!==s.length){var x=T(s,this.opts.chartData.calPoints,l,this.opts.categories,e);c=x.textList,d=x.offset;d.y=a.y,n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}}ut.call(this,n.type,n,this.config,this.context)}if("candle"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=m(this.opts.series,l);if(0!==s.length){h=P(this.opts.series[0].data,s,this.opts.chartData.calPoints,l,this.opts.categories,this.opts.extra.candle,e),c=h.textList,d=h.offset;d.y=a.y,n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}}ut.call(this,n.type,n,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type||"funnel"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=this.opts._series_[l],c=[{text:e.format?e.format(s):s.name+": "+s.data,color:s.color}],d={x:a.x,y:a.y};n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}ut.call(this,n.type,n,this.config,this.context)}if("map"===this.opts.type||"word"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=this.opts._series_[l],c=[{text:e.format?e.format(s):s.properties.name,color:s.color}],d={x:a.x,y:a.y};n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}n.updateData=!1,ut.call(this,n.type,n,this.config,this.context)}if("radar"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=m(this.opts.series,l);if(0!==s.length){c=s.map((function(t){return{text:e.format?e.format(t):t.name+": "+t.data,color:t.color}})),d={x:a.x,y:a.y};n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}}ut.call(this,n.type,n,this.config,this.context)}},vt.prototype.translate=function(t){this.scrollOption={currentOffset:t,startTouchX:t,distance:0,lastMoveTime:0};var e=r({},this.opts,{_scrollDistance_:t,animation:!1});ut.call(this,this.opts.type,e,this.config,this.context)},vt.prototype.scrollStart=function(t){var e;e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0];var i=v(e,this.opts,t);e&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=i.x)},vt.prototype.scroll=function(t){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());var e=this.opts.extra.touchMoveLimit||20,i=Date.now(),a=i-this.scrollOption.lastMoveTime;if(!(a<Math.floor(1e3/e))){this.scrollOption.lastMoveTime=i;var o;if(o=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],o&&!0===this.opts.enableScroll){var n,l=v(o,this.opts,t);n=l.x-this.scrollOption.startTouchX;var s=this.scrollOption.currentOffset,h=function(t,e,i,a,o){var r=o.width-o.area[1]-o.area[3],n=i.eachSpacing*(o.chartData.xAxisData.xAxisPoints.length-1),l=e;return 0<=e?(l=0,t.event.trigger("scrollLeft")):Math.abs(e)>=n-r&&(l=r-n,t.event.trigger("scrollRight")),l}(this,s+n,this.opts.chartData,this.config,this.opts);this.scrollOption.distance=n=h-s;var c=r({},this.opts,{_scrollDistance_:s+n,animation:!1});return ut.call(this,c.type,c,this.config,this.context),s+n}}},vt.prototype.scrollEnd=function(){if(!0===this.opts.enableScroll){var t=this.scrollOption,e=t.currentOffset,i=t.distance;this.scrollOption.currentOffset=e+i,this.scrollOption.distance=0}},"object"==a(e)&&"object"==a(e.exports)&&(e.exports=vt)}).call(this,i("df3c")["default"],i("dc84")(t))},dc84:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}}}]); |