chunk-1c7e07ca.90f1c2ce.js 2.2 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c7e07ca"],{"100e":function(t,a,i){"use strict";var n=i("6488"),e=i.n(n);e.a},6488:function(t,a,i){},"82b1":function(t,a,i){"use strict";i.r(a);var n=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("div",{staticClass:"chart-container"},[i("chart",{attrs:{height:"100%",width:"100%"}})],1)},e=[],r=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("div",{class:t.className,style:{height:t.height,width:t.width},attrs:{id:t.id}})},o=[],s=i("313e"),l=i.n(s),h=i("f42c"),c={mixins:[h["a"]],props:{className:{type:String,default:"chart"},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},data:function(){return{chart:null}},mounted:function(){this.initChart()},beforeDestroy:function(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{initChart:function(){this.chart=l.a.init(document.getElementById(this.id));for(var t=[],a=[],i=[],n=0;n<50;n++)t.push(n),a.push(5*(Math.sin(n/5)*(n/5-10)+n/6)),i.push(3*(Math.sin(n/5)*(n/5+10)+n/6));this.chart.setOption({backgroundColor:"#08263a",grid:{left:"5%",right:"5%"},xAxis:[{show:!1,data:t},{show:!1,data:t}],visualMap:{show:!1,min:0,max:50,dimension:0,inRange:{color:["#4a657a","#308e92","#b1cfa5","#f5d69f","#f5898b","#ef5055"]}},yAxis:{axisLine:{show:!1},axisLabel:{textStyle:{color:"#4a657a"}},splitLine:{show:!0,lineStyle:{color:"#08263f"}},axisTick:{show:!1}},series:[{name:"back",type:"bar",data:i,z:1,itemStyle:{normal:{opacity:.4,barBorderRadius:5,shadowBlur:3,shadowColor:"#111"}}},{name:"Simulate Shadow",type:"line",data:a,z:2,showSymbol:!1,animationDelay:0,animationEasing:"linear",animationDuration:1200,lineStyle:{normal:{color:"transparent"}},areaStyle:{normal:{color:"#08263a",shadowBlur:50,shadowColor:"#000"}}},{name:"front",type:"bar",data:a,xAxisIndex:1,z:3,itemStyle:{normal:{barBorderRadius:5}}}],animationEasing:"elasticOut",animationEasingUpdate:"elasticOut",animationDelay:function(t){return 20*t},animationDelayUpdate:function(t){return 20*t}})}}},d=c,u=i("2877"),m=Object(u["a"])(d,r,o,!1,null,null,null),p=m.exports,f={name:"KeyboardChart",components:{Chart:p}},y=f,w=(i("100e"),Object(u["a"])(y,n,e,!1,null,"98dd0a84",null));a["default"]=w.exports}}]);