|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template >
|
|
|
|
|
<div style="height: 100%; height: 100%" v-loading="load1">
|
|
|
|
|
<div style="height: 100%; height: 100%" >
|
|
|
|
|
<div id="cakeBox"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -22,7 +22,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.getData();
|
|
|
|
|
// this.getData();
|
|
|
|
|
this.initChart();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -102,22 +103,23 @@ export default {
|
|
|
|
|
arrA += value.value;
|
|
|
|
|
});
|
|
|
|
|
const item = option.legend.data.find((item) => item.name === name);
|
|
|
|
|
return `{a|${name}}{b|${( item.value / arrA * 100)}%}`;
|
|
|
|
|
// return `{a|${name}}{b|${( item.value / arrA * 100)}%}`;
|
|
|
|
|
return `{a|${name}}{b|15%}`;
|
|
|
|
|
},
|
|
|
|
|
//将waiyuan的数据拿过来,就会只显示该外圆的数据
|
|
|
|
|
// data: [
|
|
|
|
|
// { value: 15, name: "张家港市" },
|
|
|
|
|
// { value: 10, name: "吴中区" },
|
|
|
|
|
// { value: 8, name: "常熟市" },
|
|
|
|
|
// { value: 10, name: "姑苏区" },
|
|
|
|
|
// { value: 18, name: "太仓市" },
|
|
|
|
|
// { value: 6, name: "相城区" },
|
|
|
|
|
// { value: 10, name: "昆山市" },
|
|
|
|
|
// { value: 4, name: "工业园区" },
|
|
|
|
|
// { value: 10, name: "吴江区" },
|
|
|
|
|
// { value: 5, name: "高新区" },
|
|
|
|
|
// ],
|
|
|
|
|
data: this.arr1,
|
|
|
|
|
data: [
|
|
|
|
|
{ value: 15, name: "张家港市" },
|
|
|
|
|
{ value: 10, name: "吴中区" },
|
|
|
|
|
{ value: 8, name: "常熟市" },
|
|
|
|
|
{ value: 10, name: "姑苏区" },
|
|
|
|
|
{ value: 18, name: "太仓市" },
|
|
|
|
|
{ value: 6, name: "相城区" },
|
|
|
|
|
{ value: 10, name: "昆山市" },
|
|
|
|
|
{ value: 4, name: "工业园区" },
|
|
|
|
|
{ value: 10, name: "吴江区" },
|
|
|
|
|
{ value: 5, name: "高新区" },
|
|
|
|
|
],
|
|
|
|
|
// data: this.arr1,
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
@ -183,19 +185,19 @@ export default {
|
|
|
|
|
labelLine: {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
// data: [
|
|
|
|
|
// { value: 15, name: "张家港市" },
|
|
|
|
|
// { value: 10, name: "吴中区" },
|
|
|
|
|
// { value: 8, name: "常熟市" },
|
|
|
|
|
// { value: 10, name: "姑苏区" },
|
|
|
|
|
// { value: 18, name: "太仓市" },
|
|
|
|
|
// { value: 6, name: "相城区" },
|
|
|
|
|
// { value: 10, name: "昆山市" },
|
|
|
|
|
// { value: 4, name: "工业园区" },
|
|
|
|
|
// { value: 10, name: "吴江区" },
|
|
|
|
|
// { value: 5, name: "高新区" },
|
|
|
|
|
// ],
|
|
|
|
|
data: this.arr1,
|
|
|
|
|
data: [
|
|
|
|
|
{ value: 15, name: "张家港市" },
|
|
|
|
|
{ value: 10, name: "吴中区" },
|
|
|
|
|
{ value: 8, name: "常熟市" },
|
|
|
|
|
{ value: 10, name: "姑苏区" },
|
|
|
|
|
{ value: 18, name: "太仓市" },
|
|
|
|
|
{ value: 6, name: "相城区" },
|
|
|
|
|
{ value: 10, name: "昆山市" },
|
|
|
|
|
{ value: 4, name: "工业园区" },
|
|
|
|
|
{ value: 10, name: "吴江区" },
|
|
|
|
|
{ value: 5, name: "高新区" },
|
|
|
|
|
],
|
|
|
|
|
// data: this.arr1,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|