|
|
@ -34,30 +34,19 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: {
|
|
|
|
show: false,
|
|
|
|
colorStops: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: '#4FADFD', // 0% 处的颜色
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
|
|
color: 'rgba(235, 10, 10, 1)', // 100% 处的颜色
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: [0]
|
|
|
|
data: [0]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '外四环',
|
|
|
|
type: 'pie',
|
|
|
|
type: 'pie',
|
|
|
|
zlevel: 2,
|
|
|
|
zlevel: 2,
|
|
|
|
silent: true,
|
|
|
|
silent: true,
|
|
|
|
radius: ['90%', '91%'],
|
|
|
|
radius: ['90%', '91%'],
|
|
|
|
startAngle: 50,
|
|
|
|
startAngle: 50,
|
|
|
|
hoverAnimation: false,
|
|
|
|
hoverAnimation: false,
|
|
|
|
// animation:false, //charts3 no
|
|
|
|
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
show: false
|
|
|
|
show: false
|
|
|
@ -68,9 +57,10 @@ export default {
|
|
|
|
show: false
|
|
|
|
show: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: this.pie2()
|
|
|
|
data: [0]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '里四环',
|
|
|
|
type: 'pie',
|
|
|
|
type: 'pie',
|
|
|
|
zlevel: 3,
|
|
|
|
zlevel: 3,
|
|
|
|
silent: true,
|
|
|
|
silent: true,
|
|
|
@ -85,9 +75,10 @@ export default {
|
|
|
|
show: false
|
|
|
|
show: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: this.pie2()
|
|
|
|
data: [0]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '虚线环',
|
|
|
|
type: 'pie',
|
|
|
|
type: 'pie',
|
|
|
|
zlevel: 4,
|
|
|
|
zlevel: 4,
|
|
|
|
silent: true,
|
|
|
|
silent: true,
|
|
|
@ -102,9 +93,10 @@ export default {
|
|
|
|
show: false
|
|
|
|
show: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: this.pie3()
|
|
|
|
data: [0]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '三分环',
|
|
|
|
type: 'pie',
|
|
|
|
type: 'pie',
|
|
|
|
zlevel: 5,
|
|
|
|
zlevel: 5,
|
|
|
|
silent: true,
|
|
|
|
silent: true,
|
|
|
@ -121,7 +113,7 @@ export default {
|
|
|
|
data: [50, 20, 40]
|
|
|
|
data: [50, 20, 40]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: "",
|
|
|
|
name: "刻度环",
|
|
|
|
type: 'gauge',
|
|
|
|
type: 'gauge',
|
|
|
|
splitNumber: 30, //刻度数量
|
|
|
|
splitNumber: 30, //刻度数量
|
|
|
|
min: 0,
|
|
|
|
min: 0,
|
|
|
@ -167,7 +159,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//name: '统计',
|
|
|
|
name: '刻度环',
|
|
|
|
type: 'gauge',
|
|
|
|
type: 'gauge',
|
|
|
|
splitNumber: 30, //刻度数量
|
|
|
|
splitNumber: 30, //刻度数量
|
|
|
|
min: 0,
|
|
|
|
min: 0,
|
|
|
@ -223,21 +215,6 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: []
|
|
|
|
data: []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
|
|
|
|
type: 'pie',
|
|
|
|
|
|
|
|
zlevel: 20,
|
|
|
|
|
|
|
|
silent: true,
|
|
|
|
|
|
|
|
radius: ['60%', '59%'],
|
|
|
|
|
|
|
|
hoverAnimation: false,
|
|
|
|
|
|
|
|
color: '#2dc0c9',
|
|
|
|
|
|
|
|
// animation:false,
|
|
|
|
|
|
|
|
//data: [1],
|
|
|
|
|
|
|
|
labelLine: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
show: false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: '中间环形图',
|
|
|
|
name: '中间环形图',
|
|
|
|
type: 'pie',
|
|
|
|
type: 'pie',
|
|
|
@ -312,7 +289,42 @@ export default {
|
|
|
|
this.editorOptions();
|
|
|
|
this.editorOptions();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
pie2() {
|
|
|
|
editorOptions() {
|
|
|
|
|
|
|
|
this.setOptionsLastRing();
|
|
|
|
|
|
|
|
this.setOptionsEightRing();
|
|
|
|
|
|
|
|
this.setOptionsDottedRing();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 最外外环1
|
|
|
|
|
|
|
|
setOptionsLastRing() {
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
|
|
|
const series = this.options.series[0];
|
|
|
|
|
|
|
|
if (optionsSetup.isLastRingShow) {
|
|
|
|
|
|
|
|
series.data = [0]
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
series.data = ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const normal = {
|
|
|
|
|
|
|
|
color: {
|
|
|
|
|
|
|
|
colorStops: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: optionsSetup.lastRing0Color,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
|
|
color: optionsSetup.lastRing100Color,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
series.itemStyle['normal'] = normal;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setRingPie2() {
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
|
|
|
let eightColor = optionsSetup.eightColor;
|
|
|
|
|
|
|
|
if (eightColor == "") {
|
|
|
|
|
|
|
|
eightColor = 'rgba(0,0,0,0)';
|
|
|
|
|
|
|
|
}
|
|
|
|
let dataArr = [];
|
|
|
|
let dataArr = [];
|
|
|
|
for (let i = 0; i < 8; i++) {
|
|
|
|
for (let i = 0; i < 8; i++) {
|
|
|
|
if (i % 2 === 0) {
|
|
|
|
if (i % 2 === 0) {
|
|
|
@ -321,9 +333,9 @@ export default {
|
|
|
|
value: 25,
|
|
|
|
value: 25,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: "rgba(88,142,197,0.5)",
|
|
|
|
color: optionsSetup.eightColor,
|
|
|
|
borderWidth: 0,
|
|
|
|
borderWidth: 0,
|
|
|
|
borderColor: "rgba(0,0,0,0)"
|
|
|
|
borderColor: 'rgba(0,0,0,0)'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -333,9 +345,7 @@ export default {
|
|
|
|
value: 20,
|
|
|
|
value: 20,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: "rgba(0,0,0,0)",
|
|
|
|
color: 'rgba(0,0,0,0)'
|
|
|
|
borderWidth: 0,
|
|
|
|
|
|
|
|
borderColor: "rgba(0,0,0,0)"
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -343,18 +353,28 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return dataArr
|
|
|
|
return dataArr
|
|
|
|
},
|
|
|
|
},
|
|
|
|
pie3() {
|
|
|
|
setOptionsEightRing() {
|
|
|
|
|
|
|
|
const series = this.options.series;
|
|
|
|
|
|
|
|
series[1].data = this.setRingPie2();
|
|
|
|
|
|
|
|
series[2].data = this.setRingPie2();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setRingPie3() {
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
|
|
|
let dottedColor = optionsSetup.dottedColor;
|
|
|
|
|
|
|
|
if (dottedColor == "") {
|
|
|
|
|
|
|
|
dottedColor = 'rgba(0,0,0,0)';
|
|
|
|
|
|
|
|
}
|
|
|
|
let dataArr = [];
|
|
|
|
let dataArr = [];
|
|
|
|
for (let i = 0; i < 100; i++) {
|
|
|
|
for (let i = 0; i < (optionsSetup.dottedNum * 2); i++) {
|
|
|
|
if (i % 2 === 0) {
|
|
|
|
if (i % 2 === 0) {
|
|
|
|
dataArr.push({
|
|
|
|
dataArr.push({
|
|
|
|
name: (i + 1).toString(),
|
|
|
|
name: (i + 1).toString(),
|
|
|
|
value: 25,
|
|
|
|
value: 25,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: "rgb(126,190,255)",
|
|
|
|
color: dottedColor,
|
|
|
|
borderWidth: 0,
|
|
|
|
borderWidth: 0,
|
|
|
|
borderColor: "rgba(0,0,0,0)"
|
|
|
|
borderColor: 'rgba(0,0,0,0)'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -364,7 +384,7 @@ export default {
|
|
|
|
value: 20,
|
|
|
|
value: 20,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: "rgba(0,0,0,0)",
|
|
|
|
color: 'rgba(0,0,0,0)',
|
|
|
|
borderWidth: 0,
|
|
|
|
borderWidth: 0,
|
|
|
|
borderColor: "rgba(0,0,0,0)"
|
|
|
|
borderColor: "rgba(0,0,0,0)"
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -374,34 +394,9 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return dataArr
|
|
|
|
return dataArr
|
|
|
|
},
|
|
|
|
},
|
|
|
|
editorOptions() {
|
|
|
|
setOptionsDottedRing(){
|
|
|
|
this.setOptionsLastRing();
|
|
|
|
const series = this.options.series;
|
|
|
|
//this.setOptionsTitle();
|
|
|
|
series[3].data = this.setRingPie3()
|
|
|
|
},
|
|
|
|
|
|
|
|
// 最外外环1
|
|
|
|
|
|
|
|
setOptionsLastRing() {
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
|
|
|
const series = this.options.series[0];
|
|
|
|
|
|
|
|
if (optionsSetup.isLastRingShow) {
|
|
|
|
|
|
|
|
series.data = [0]
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
series.data = ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const normal = {
|
|
|
|
|
|
|
|
color: {
|
|
|
|
|
|
|
|
colorStops: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: optionsSetup.lastRing0Color,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
|
|
color: optionsSetup.lastRing100Color,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
series.itemStyle['normal'] = normal;
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 标题修改
|
|
|
|
// 标题修改
|
|
|
|
setOptionsTitle() {
|
|
|
|
setOptionsTitle() {
|
|
|
@ -423,7 +418,7 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.options.title = title;
|
|
|
|
this.options.title = title;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|