webpackJsonp([13],{"9nud":function(t,a){},G8vr:function(t,a){},P4qu:function(t,a,r){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e=r("fZjL"),n=r.n(e),o=(r("UlOv"),{name:"polarArea",props:["chartData","options","width","height"],watch:{chartData:function(){this.myChart?this.myChart.update():this.myChart=new Chart(this.$refs.chart.getContext("2d"),{type:"polarArea",data:this.chartData,options:this.options})}},data:function(){return{myChart:null}},mounted:function(){this.chartData&&(this.myChart=new Chart(this.$refs.chart.getContext("2d"),{type:"polarArea",data:this.chartData,options:this.options}))},methods:{updateChart:function(){this.myChart.update()}}}),s={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",[a("canvas",{ref:"chart",staticStyle:{margin:"auto"},attrs:{height:this.height}})])},staticRenderFns:[]};var i=r("VU/8")(o,s,!1,function(t){r("G8vr")},"data-v-41a26eca",null).exports,h=r("WaEV"),c=r.n(h),l={created:function(){},data:function(){return{options:{responsive:!0,legend:{position:"right"},title:{display:!0,text:"极地图"},scale:{ticks:{beginAtZero:!0},reverse:!1},animation:{animateRotate:!1,animateScale:!0}},chartData:null,chartColors:{red:"rgb(255, 99, 132)",orange:"rgb(255, 159, 64)",yellow:"rgb(255, 205, 86)",green:"rgb(75, 192, 192)",blue:"rgb(54, 162, 235)",purple:"rgb(153, 102, 255)",grey:"rgb(201, 203, 207)"}}},mounted:function(){this.updateChart()},methods:{updateChart:function(){this.type=this.$route.query.type,this._seed=Date.now(),this.chartData={datasets:[{data:[this.randomScalingFactor(),this.randomScalingFactor(),this.randomScalingFactor(),this.randomScalingFactor(),this.randomScalingFactor()],backgroundColor:[c.a.helpers.color(this.chartColors.red).alpha(.5).rgbString(),c.a.helpers.color(this.chartColors.orange).alpha(.5).rgbString(),c.a.helpers.color(this.chartColors.yellow).alpha(.5).rgbString(),c.a.helpers.color(this.chartColors.green).alpha(.5).rgbString(),c.a.helpers.color(this.chartColors.blue).alpha(.5).rgbString()],label:"My dataset"}],labels:["Red","Orange","Yellow","Green","Blue"]}},randomScalingFactor:function(){return Math.round(100*Math.random())},randomizeData:function(){var t=this,a=this.chartData;a.datasets.forEach(function(r,e){var n=r;n.data.forEach(function(a,r){n.data[r]=t.randomScalingFactor()}),a.datasets[e]=n}),this.chartData=a,this.$refs.line.updateChart()},addData:function(){var t=this,a=n()(this.chartColors);this.chartData.datasets.length>0&&(this.chartData.labels.push("data #"+this.chartData.labels.length),this.chartData.datasets.forEach(function(r,e){var n=a[t.chartData.labels.length%a.length];t.chartData.datasets[e].backgroundColor.push(t.chartColors[n]),t.chartData.datasets[e].data.push(t.randomScalingFactor())}),this.$refs.line.updateChart())},removeData:function(){var t=this;this.chartData.labels.pop(),this.chartData.datasets.forEach(function(a,r){t.chartData.datasets[r].backgroundColor.pop(),t.chartData.datasets[r].data.pop()}),this.$refs.line.updateChart()}},components:{polarArea:i}},d={render:function(){var t=this,a=t.$createElement,r=t._self._c||a;return r("div",[r("polar-area",{ref:"line",staticStyle:{"max-width":"1000px",margin:"auto"},attrs:{height:150,chartData:t.chartData,options:t.options}}),t._v(" "),r("el-row",{staticClass:"btn-content",attrs:{type:"flex",justify:"center"}},[r("el-button",{on:{click:t.randomizeData}},[t._v("随机改变值")]),t._v(" "),r("el-button",{attrs:{type:"info"},on:{click:t.addData}},[t._v("添加数据")]),t._v(" "),r("el-button",{attrs:{type:"warning"},on:{click:t.removeData}},[t._v("删除数据")])],1)],1)},staticRenderFns:[]};var u=r("VU/8")(l,d,!1,function(t){r("9nud")},"data-v-074fcd62",null);a.default=u.exports}});
//# sourceMappingURL=13.6a299c143c9d90b6af28.js.map