|
@@ -250,7 +250,10 @@ export default {
|
|
|
tooltip: {
|
|
|
trigger: 'item',
|
|
|
formatter: function (params) {
|
|
|
- return params.name + ' : ' + params.value;
|
|
|
+ var htmlText = `<div class='custom-tooltip-style'>
|
|
|
+ ${params.name}:${params.value}
|
|
|
+ </div>`
|
|
|
+ return htmlText
|
|
|
}
|
|
|
},
|
|
|
graphic: [{
|
|
@@ -352,8 +355,10 @@ export default {
|
|
|
//地图名字
|
|
|
show: true,
|
|
|
textStyle: {
|
|
|
- color: "#fff",
|
|
|
+ color: "#fff", // 字体颜色
|
|
|
fontSize: 14,
|
|
|
+ textBorderColor: "#0033fd", // 字体边框颜色
|
|
|
+ textBorderWidth: 1 // 边框宽度
|
|
|
},
|
|
|
},
|
|
|
emphasis: {
|
|
@@ -564,14 +569,14 @@ export default {
|
|
|
// 数据展示
|
|
|
data: data
|
|
|
});
|
|
|
- let timeOut4 = null
|
|
|
- clearInterval(timeOut4)
|
|
|
+ let timeOut = null
|
|
|
+ clearInterval(timeOut)
|
|
|
myChart.clear();
|
|
|
if (option) {
|
|
|
myChart.setOption(option);
|
|
|
}
|
|
|
var currentIndex = -1;
|
|
|
- timeOut4 = setInterval(() => {
|
|
|
+ timeOut = setInterval(() => {
|
|
|
var dataLen = option.series[0].data.length;
|
|
|
myChart.dispatchAction({
|
|
|
type: 'downplay',
|
|
@@ -587,8 +592,18 @@ export default {
|
|
|
myChart.dispatchAction({
|
|
|
type: 'showTip',
|
|
|
seriesIndex: 0,
|
|
|
- dataIndex: currentIndex
|
|
|
+ dataIndex: currentIndex,
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: function (params) {
|
|
|
+ var htmlText = `<div class='custom-tooltip-style'>
|
|
|
+ ${params.name}:${params.value}
|
|
|
+ </div>`
|
|
|
+ return htmlText
|
|
|
+ }
|
|
|
+ },
|
|
|
});
|
|
|
+ myChart.setOption(option);
|
|
|
}, 1500)
|
|
|
}
|
|
|
}
|