Disable country highlight - Update node styling
This commit is contained in:
parent
ff370684f1
commit
b31a82d27e
@ -146,7 +146,7 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
|
|||||||
center: this.center,
|
center: this.center,
|
||||||
zoom: this.zoom,
|
zoom: this.zoom,
|
||||||
tooltip: {
|
tooltip: {
|
||||||
show: true
|
show: false
|
||||||
},
|
},
|
||||||
map: 'world',
|
map: 'world',
|
||||||
roam: this.style === 'widget' ? false : true,
|
roam: this.style === 'widget' ? false : true,
|
||||||
@ -157,6 +157,9 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
|
|||||||
scaleLimit: {
|
scaleLimit: {
|
||||||
min: 1.3,
|
min: 1.3,
|
||||||
max: 100000,
|
max: 100000,
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
disabled: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
@ -169,6 +172,7 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
|
|||||||
geoIndex: 0,
|
geoIndex: 0,
|
||||||
symbolSize: 4,
|
symbolSize: 4,
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
show: true,
|
||||||
backgroundColor: 'rgba(17, 19, 31, 1)',
|
backgroundColor: 'rgba(17, 19, 31, 1)',
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
@ -185,12 +189,12 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
|
|||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: 'white',
|
color: 'white',
|
||||||
borderColor: 'black',
|
|
||||||
borderWidth: 2,
|
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
|
borderColor: 'black',
|
||||||
|
borderWidth: 0,
|
||||||
},
|
},
|
||||||
blendMode: 'lighter',
|
blendMode: 'lighter',
|
||||||
zlevel: 1,
|
zlevel: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
large: true,
|
large: true,
|
||||||
@ -209,7 +213,7 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
|
|||||||
tooltip: {
|
tooltip: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
zlevel: 2,
|
zlevel: 1,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -250,12 +254,19 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
|
|||||||
series: this.chartOptions.series
|
series: this.chartOptions.series
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let nodeBorder = 0;
|
||||||
|
if (this.chartInstance.getOption().geo[0].zoom > 5000) {
|
||||||
|
nodeBorder = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
chartOptions.series[0].itemStyle.borderWidth = nodeBorder;
|
||||||
|
chartOptions.series[0].symbolSize += e.zoom > 1 ? speed * 15 : -speed * 15;
|
||||||
|
chartOptions.series[0].symbolSize = Math.max(4, Math.min(7, chartOptions.series[0].symbolSize));
|
||||||
|
|
||||||
chartOptions.series[1].lineStyle.opacity += e.zoom > 1 ? speed : -speed;
|
chartOptions.series[1].lineStyle.opacity += e.zoom > 1 ? speed : -speed;
|
||||||
chartOptions.series[1].lineStyle.width += e.zoom > 1 ? speed : -speed;
|
chartOptions.series[1].lineStyle.width += e.zoom > 1 ? speed : -speed;
|
||||||
chartOptions.series[0].symbolSize += e.zoom > 1 ? speed * 10 : -speed * 10;
|
|
||||||
chartOptions.series[1].lineStyle.opacity = Math.max(0.05, Math.min(0.5, chartOptions.series[1].lineStyle.opacity));
|
chartOptions.series[1].lineStyle.opacity = Math.max(0.05, Math.min(0.5, chartOptions.series[1].lineStyle.opacity));
|
||||||
chartOptions.series[1].lineStyle.width = Math.max(0.5, Math.min(1, chartOptions.series[1].lineStyle.width));
|
chartOptions.series[1].lineStyle.width = Math.max(0.5, Math.min(1, chartOptions.series[1].lineStyle.width));
|
||||||
chartOptions.series[0].symbolSize = Math.max(4, Math.min(5.5, chartOptions.series[0].symbolSize));
|
|
||||||
|
|
||||||
this.chartInstance.setOption(chartOptions);
|
this.chartInstance.setOption(chartOptions);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user