8 lines
456 KiB
JavaScript
8 lines
456 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4a3f","chunk-e4a7"],{"/rDb":function(e,t,a){},"0DEJ":function(e,t,a){},"16mM":function(e,t,a){"use strict";var i=a("MTDE");a.n(i).a},"1BXT":function(e,t,a){"use strict";var i=a("lxq7");a.n(i).a},"1C1b":function(e,t,a){"use strict";var i=a("/rDb");a.n(i).a},"1JnI":function(e,t,a){"use strict";var i=a("P2sY"),o=a.n(i),n={name:"WidgetBarlinechart",components:{},props:{value:Object,ispreview:Boolean},data:function(){return{options:{color:[],grid:{},title:{text:"",textStyle:{color:"#fff"}},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c}%"},legend:{textStyle:{color:"#fff"}},xAxis:[{type:"category",data:[],axisLabel:{show:!1,textStyle:{color:"#fff"}}}],yAxis:[{type:"value",name:"",min:0,max:250,interval:50,axisLabel:{show:!0,textStyle:{color:"#fff"}}},{type:"value",name:"",min:0,max:25,interval:5,axisLabel:{show:!0,textStyle:{color:"#fff"}}}],series:[{name:"",type:"bar",yAxisIndex:0,data:[],itemStyle:{barBorderRadius:null}},{name:"",type:"line",yAxisIndex:1,data:[],itemStyle:{}}]},optionsStyle:{},optionsData:{},optionsCollapse:{},optionsSetup:{}}},computed:{styleObj:function(){return{position:this.ispreview?"absolute":"static",width:this.optionsStyle.width+"px",height:this.optionsStyle.height+"px",left:this.optionsStyle.left+"px",top:this.optionsStyle.top+"px",background:this.optionsSetup.background}}},watch:{value:{handler:function(e){this.optionsStyle=e.position,this.optionsData=e.data,this.optionsCollapse=e.collapse,this.optionsSetup=e.setup,this.editorOptions()},deep:!0}},created:function(){this.optionsStyle=this.value.position,this.optionsData=this.value.data,this.optionsCollapse=this.value.collapse,this.optionsSetup=this.value.setup,this.editorOptions()},methods:{editorOptions:function(){this.setOptionsTitle(),this.setOptionsX(),this.setOptionsY(),this.setOptionsLine(),this.setOptionsBar(),this.setOptionsTooltip(),this.setOptionsData(),this.setOptionsMargin(),this.setOptionsLegend(),this.setOptionsColor()},setOptionsTitle:function(){var e=this.optionsSetup,t={};t.text=e.titleText,t.show=e.isNoTitle,t.left=e.textAlign,t.textStyle={color:e.textColor,fontSize:e.textFontSize,fontWeight:e.textFontWeight},t.subtext=e.subText,t.subtextStyle={color:e.subTextColor,fontWeight:e.subTextFontWeight,fontSize:e.subTextFontSize},this.options.title=t},setOptionsX:function(){var e=this.optionsSetup,t={type:"category",show:e.hideX,name:e.xName,nameTextStyle:{color:e.nameColorX,fontSize:e.nameFontSizeX},nameRotate:e.textAngle,inverse:e.reversalX,axisLabel:{show:!0,interval:e.textInterval,rotate:e.textAngle,textStyle:{color:e.Xcolor,fontSize:e.fontSizeX}},axisLine:{show:!0,lineStyle:{color:e.lineColorX}},splitLine:{show:e.isShowSplitLineX,lineStyle:{color:e.splitLineColorX}}};this.options.xAxis=t},setOptionsY:function(){var e=this.optionsSetup,t=[{type:"value",splitNumber:e.splitNumberLeft,show:e.isShowYLeft,name:e.textNameYLeft,nameTextStyle:{color:e.nameColorYLeft,fontSize:e.namefontSizeYLeft},inverse:e.reversalY,axisLabel:{show:!0,textStyle:{color:e.colorY,fontSize:e.fontSizeY}},axisLine:{show:!0,lineStyle:{color:e.lineColorY}},splitLine:{show:!1}},{type:"value",splitNumber:e.splitNumberRight,show:e.isShowYRight,name:e.textNameYRight,nameTextStyle:{color:e.nameColorYRight,fontSize:e.namefontSizeYRight},inverse:e.reversalY,axisLabel:{show:!0,textStyle:{color:e.colorY,fontSize:e.fontSizeY}},axisLine:{show:!0,lineStyle:{color:e.lineColorY}},splitLine:{show:!1}}];this.options.yAxis=t},setOptionsLine:function(){var e=this.optionsSetup,t=this.options.series;for(var a in t)"line"==t[a].type&&(t[a].showSymbol=e.markPoint,t[a].symbolSize=e.pointSize,t[a].smooth=e.smoothCurve,e.area?t[a].areaStyle={opacity:e.areaThickness/100}:t[a].areaStyle={opacity:0},t[a].lineStyle={width:e.lineWidth},t[a].itemStyle.borderRadius=e.radius,t[a].label={show:e.isShowLine,position:"top",distance:e.distanceLine,fontSize:e.fontSizeLine,color:e.subTextColorLine,fontWeight:e.fontWeightLine});this.options.series=t},setOptionsBar:function(){var e=this.optionsSetup,t=this.options.series;for(var a in t)"bar"==
|
|||
|
/*!
|
|||
|
* wordcloud2.js
|
|||
|
* http://timdream.org/wordcloud2.js/
|
|||
|
*
|
|||
|
* Copyright 2011 - 2013 Tim Chien
|
|||
|
* Released under the MIT license
|
|||
|
*/window.setImmediate||(window.setImmediate=window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var e=[void 0],t="zero-timeout-message";return window.addEventListener("message",function(a){if("string"==typeof a.data&&a.data.substr(0,t.length)===t){a.stopImmediatePropagation();var i=parseInt(a.data.substr(t.length),36);e[i]&&(e[i](),e[i]=void 0)}},!0),window.clearImmediate=function(t){e[t]&&(e[t]=void 0)},function(a){var i=e.length;return e.push(a),window.postMessage(t+i.toString(36),"*"),i}}()||function(e){window.setTimeout(e,0)}),window.clearImmediate||(window.clearImmediate=window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(e){window.clearTimeout(e)}),function(a){var o=function(){var e=document.createElement("canvas");if(!e||!e.getContext)return!1;var t=e.getContext("2d");return!!(t.getImageData&&t.fillText&&Array.prototype.some&&Array.prototype.push)}(),n=function(){if(o){for(var e,t,a=document.createElement("canvas").getContext("2d"),i=20;i;){if(a.font=i.toString(10)+"px sans-serif",a.measureText("W").width===e&&a.measureText("m").width===t)return i+1;e=a.measureText("W").width,t=a.measureText("m").width,i--}return 0}}(),l=function(e){for(var t,a,i=e.length;i;t=Math.floor(Math.random()*i),a=e[--i],e[i]=e[t],e[t]=a);return e},r=function(e,t){function a(e,t){return"hsl("+(360*Math.random()).toFixed()+","+(30*Math.random()+70).toFixed()+"%,"+(Math.random()*(t-e)+e).toFixed()+"%)"}if(o){Array.isArray(e)||(e=[e]),e.forEach(function(t,a){if("string"==typeof t){if(e[a]=document.getElementById(t),!e[a])throw"The element id specified is not found."}else if(!t.tagName&&!t.appendChild)throw"You must pass valid HTML elements, or ID of the element."});var i={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(t)for(var r in t)r in i&&(i[r]=t[r]);if("function"!=typeof i.weightFactor){var s=i.weightFactor;i.weightFactor=function(e){return e*s}}if("function"!=typeof i.shape)switch(i.shape){case"circle":default:i.shape="circle";break;case"cardioid":i.shape=function(e){return 1-Math.sin(e)};break;case"diamond":case"square":i.shape=function(e){var t=e%(2*Math.PI/4);return 1/(Math.cos(t)+Math.sin(t))};break;case"triangle-forward":i.shape=function(e){var t=e%(2*Math.PI/3);return 1/(Math.cos(t)+Math.sqrt(3)*Math.sin(t))};break;case"triangle":case"triangle-upright":i.shape=function(e){var t=(e+3*Math.PI/2)%(2*Math.PI/3);return 1/(Math.cos(t)+Math.sqrt(3)*Math.sin(t))};break;case"pentagon":i.shape=function(e){var t=(e+.955)%(2*Math.PI/5);return 1/(Math.cos(t)+.726543*Math.sin(t))};break;case"star":i.shape=function(e){var t=(e+.955)%(2*Math.PI/10);return(e+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-t)+3.07768*Math.sin(2*Math.PI/10-t)):1/(Math.cos(t)+3.07768*Math.sin(t))}}i.gridSize=Math.max(Math.floor(i.gridSize),4);var u,c,h,p,d,m,f,v=i.gridSize,y=v-i.maskGapWidth,g=Math.abs(i.maxRotation-i.minRotation),b=Math.min(i.maxRotation,i.minRotation),x=i.rotationStep;switch(i.color){case"random-dark":f=function(){return a(10,50)};break;case"random-light":f=function(){return a(50,90)};break;default:"function"==typeof i.color&&(f=i.color)}var S=null;"function"==typeof i.classes&&(S=i.classes);var w,q=!1,C=[],D=function(e){var t,a,i=e.currentTarget,o=i.getBoundingClientRect();e.touches?(t=e.touches[0].clientX,a=e.touches[0].clientY):(t=e.clientX,a=e.clientY);var n=t-o.left,l=a-o.top,r=Math.floor(n*(i.width/o.width||1)/v),s=Math.floor(l*(i.height/o.height||1)/v);return C[r][s]},T=function(e)
|