|
|
@ -255,12 +255,11 @@ export default {
|
|
|
|
map: 'china',
|
|
|
|
map: 'china',
|
|
|
|
aspectScale: 0.75,
|
|
|
|
aspectScale: 0.75,
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
normal: {
|
|
|
|
normal: {//调整数值
|
|
|
|
//formatter: '{b}',
|
|
|
|
|
|
|
|
position: 'right',
|
|
|
|
position: 'right',
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
color: '#53D9FF',
|
|
|
|
color: '#53D9FF',
|
|
|
|
fontSize: 15
|
|
|
|
fontSize: 20
|
|
|
|
},
|
|
|
|
},
|
|
|
|
emphasis: {
|
|
|
|
emphasis: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
@ -354,7 +353,8 @@ export default {
|
|
|
|
symbolSize: function (val) {
|
|
|
|
symbolSize: function (val) {
|
|
|
|
if (val[2] == 0) {
|
|
|
|
if (val[2] == 0) {
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
;
|
|
|
|
return ((maxSize4Pin - minSize4Pin) / (max - min)) * val[2] + (maxSize4Pin - ((maxSize4Pin - minSize4Pin) / (max - min)) * max) * 1.2;
|
|
|
|
return ((maxSize4Pin - minSize4Pin) / (max - min)) * val[2] + (maxSize4Pin - ((maxSize4Pin - minSize4Pin) / (max - min)) * max) * 1.2;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: convertData(data),
|
|
|
|
data: convertData(data),
|
|
|
@ -402,6 +402,10 @@ export default {
|
|
|
|
// 修改图标options属性
|
|
|
|
// 修改图标options属性
|
|
|
|
editorOptions() {
|
|
|
|
editorOptions() {
|
|
|
|
this.setOptionsTitle();
|
|
|
|
this.setOptionsTitle();
|
|
|
|
|
|
|
|
this.setOptionTextValue();
|
|
|
|
|
|
|
|
this.setOptionDataValue();
|
|
|
|
|
|
|
|
this.setOptionsData();
|
|
|
|
|
|
|
|
this.setOptionAirSize();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 标题设置
|
|
|
|
// 标题设置
|
|
|
|
setOptionsTitle() {
|
|
|
|
setOptionsTitle() {
|
|
|
@ -423,20 +427,54 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.options.title = title;
|
|
|
|
this.options.title = title;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
setOptionTextValue() {
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
|
|
|
const label = this.options.series[0]['label'];
|
|
|
|
|
|
|
|
const normal = {
|
|
|
|
|
|
|
|
position: 'right',
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
color: optionsSetup.fontTextColor,
|
|
|
|
|
|
|
|
fontSize: optionsSetup.fontTextSize,
|
|
|
|
|
|
|
|
fontWeight: optionsSetup.fontTextWeight,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
label['normal'] = normal;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setOptionDataValue(){
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
|
|
|
const label = this.options.series[1]['label'];
|
|
|
|
|
|
|
|
const normal = {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
color: '#fff',
|
|
|
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
|
|
|
position: 'inside',
|
|
|
|
|
|
|
|
formatter: function (para) {
|
|
|
|
|
|
|
|
return '{cnNum|' + para.data.value[2] + '}'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
rich: {
|
|
|
|
|
|
|
|
cnNum: {
|
|
|
|
|
|
|
|
fontSize: optionsSetup.fontDataSize,
|
|
|
|
|
|
|
|
color: optionsSetup.fontDataColor,
|
|
|
|
|
|
|
|
fontWeight:optionsSetup.fontDataWeight,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
label['normal'] = normal;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setOptionAirSize(){
|
|
|
|
|
|
|
|
minSize4Pin = this.optionsSetup.fontAirSize
|
|
|
|
|
|
|
|
},
|
|
|
|
//数据解析
|
|
|
|
//数据解析
|
|
|
|
setOptionsData() {
|
|
|
|
setOptionsData() {
|
|
|
|
const optionsData = this.optionsData; // 数据类型 静态 or 动态
|
|
|
|
const optionsData = this.optionsData; // 数据类型 静态 or 动态
|
|
|
|
optionsData.dataType == "staticData"
|
|
|
|
optionsData.dataType == "staticData"
|
|
|
|
? this.staticDataFn(optionsData.staticData)
|
|
|
|
? this.staticDataFn(optionsData.staticData)
|
|
|
|
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
|
|
|
|
: this.dynamicDataFn(
|
|
|
|
|
|
|
|
optionsData.dynamicData,
|
|
|
|
|
|
|
|
optionsData.refreshTime
|
|
|
|
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
staticDataFn(val) {
|
|
|
|
staticDataFn(val) {
|
|
|
|
const staticData = JSON.parse(val);
|
|
|
|
|
|
|
|
for (const key in this.options.series) {
|
|
|
|
|
|
|
|
if (this.options.series[key].type == "china") {
|
|
|
|
|
|
|
|
this.options.series[key].data = staticData;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dynamicDataFn(val, refreshTime) {
|
|
|
|
dynamicDataFn(val, refreshTime) {
|
|
|
|
if (!val) return;
|
|
|
|
if (!val) return;
|
|
|
|