|
|
@ -254,6 +254,7 @@ export default {
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
//剩余圆环颜色
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: '#173164',
|
|
|
|
color: '#173164',
|
|
|
@ -359,9 +360,10 @@ export default {
|
|
|
|
this.setOptionsTitle();
|
|
|
|
this.setOptionsTitle();
|
|
|
|
//this.setOptionsTooltip();
|
|
|
|
//this.setOptionsTooltip();
|
|
|
|
//this.setOptionsLegend();
|
|
|
|
//this.setOptionsLegend();
|
|
|
|
//this.setOptionsColor();
|
|
|
|
this.setOptionsColor();
|
|
|
|
this.setOptionsData();
|
|
|
|
this.setOptionsData();
|
|
|
|
this.setOptionLine();
|
|
|
|
this.setOptionLine();
|
|
|
|
|
|
|
|
this.setOptionSurplusColor();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setOptionsTitle() {
|
|
|
|
setOptionsTitle() {
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
@ -397,48 +399,33 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//圆环0-100%颜色
|
|
|
|
//圆环0-100%颜色
|
|
|
|
/*setOptionPerData(val) {
|
|
|
|
setOptionsColor() {
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
const data = this.options.series[6]['data'];
|
|
|
|
const itemStyle = this.options.series[6]['data'][0]['itemStyle']
|
|
|
|
data.forEach((ev, index) => {
|
|
|
|
const normal = {
|
|
|
|
if (index == 0) {
|
|
|
|
|
|
|
|
ev.value = val
|
|
|
|
|
|
|
|
const itemStyle = {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: {
|
|
|
|
color: {
|
|
|
|
|
|
|
|
// 完成的圆环的颜色
|
|
|
|
colorStops: [
|
|
|
|
colorStops: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
offset: 0,
|
|
|
|
offset: 0,
|
|
|
|
color: optionsSetup.colorStart, // 0% 处的颜色
|
|
|
|
color: optionsSetup.color0Start, // 0% 处的颜色
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
offset: 1,
|
|
|
|
offset: 1,
|
|
|
|
color: optionsSetup.colorEnd, // 100% 处的颜色
|
|
|
|
color: optionsSetup.color100End, // 100% 处的颜色
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
data['itemStyle'] = itemStyle
|
|
|
|
|
|
|
|
} else if (index == 1) {
|
|
|
|
|
|
|
|
ev.value = (100 - val)
|
|
|
|
|
|
|
|
const label = {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const itemStyle = {
|
|
|
|
itemStyle['normal'] = normal
|
|
|
|
/!*normal: {
|
|
|
|
},
|
|
|
|
color: '#173164',
|
|
|
|
setOptionSurplusColor(){
|
|
|
|
},*!/
|
|
|
|
const itemStyle = this.options.series[6]['data'][1]['itemStyle']
|
|
|
|
|
|
|
|
const normal = {
|
|
|
|
|
|
|
|
color: this.optionsSetup.colorsurplus,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
data['label'] = label;
|
|
|
|
itemStyle['normal'] = normal
|
|
|
|
data['itemStyle'] = itemStyle;
|
|
|
|
},
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},*/
|
|
|
|
|
|
|
|
setOptionLine() {
|
|
|
|
setOptionLine() {
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
const line = this.options.series[7]['splitLine'];
|
|
|
|
const line = this.options.series[7]['splitLine'];
|
|
|
@ -466,7 +453,6 @@ export default {
|
|
|
|
title.text = '{nums|' + val + '}{percent|%}';
|
|
|
|
title.text = '{nums|' + val + '}{percent|%}';
|
|
|
|
this.options.series[6]['data'][0]['value'] = val ;
|
|
|
|
this.options.series[6]['data'][0]['value'] = val ;
|
|
|
|
this.options.series[6]['data'][1]['value'] = 100 - val ;
|
|
|
|
this.options.series[6]['data'][1]['value'] = 100 - val ;
|
|
|
|
//this.setOptionPerData(val)
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dynamicDataFn(val, refreshTime) {
|
|
|
|
dynamicDataFn(val, refreshTime) {
|
|
|
|
if (!val) return;
|
|
|
|
if (!val) return;
|
|
|
|