fix:解决冲突

This commit is contained in:
zyh
2023-08-28 18:07:19 +08:00
5 changed files with 53 additions and 11 deletions

View File

@@ -17659,7 +17659,7 @@
},
"showdown": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/showdown/-/showdown-2.1.0.tgz",
"resolved": "https://registry.npmmirror.com/showdown/-/showdown-2.1.0.tgz",
"integrity": "sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==",
"requires": {
"commander": "^9.0.0"
@@ -17667,7 +17667,7 @@
"dependencies": {
"commander": {
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
"resolved": "https://registry.npmmirror.com/commander/-/commander-9.5.0.tgz",
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ=="
}
}
@@ -19368,7 +19368,7 @@
"tmp": {
"version": "0.0.29",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz",
"integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=",
"integrity": "sha512-89PTqMWGDva+GqClOqBV9s3SMh7MA3Mq0pJUdAoHuF65YoE7O0LermaZkVfT5/Ngfo18H4eYiyG7zKOtnEbxsw==",
"dev": true,
"requires": {
"os-tmpdir": "~1.0.1"

View File

@@ -412,6 +412,9 @@
.nz-icon{
color: $--background-color-1 !important;
}
.nz-icon-override{
color: $--color-text-regular !important;
}
}
}
.nz-icon-override{
@@ -419,6 +422,7 @@
font-size: 15px;
margin-left: 5px;
vertical-align: middle;
color: $--color-text-regular !important;
}
.legend-item:hover {
background-color: $--background-color-1;

View File

@@ -256,9 +256,31 @@ export default {
}
myChart.on('mouseover', (params) => {
if (this.chartInfo.type !== 'point') {
if (this.tooltip.activeIndex != params.seriesIndex) {
const option = myChart.getOption()
option.series[params.seriesIndex].symbol = 'circle'
option.series[params.seriesIndex].emphasis.itemStyle = {
opacity: 1,
borderColor: this.hexToRgb(params.color, 0.4),
borderWidth: 6
}
myChart.setOption(option, true)
}
}
this.tooltip.activeIndex = params.seriesIndex
})
myChart.on('mouseout', () => {
myChart.on('mouseout', (params) => {
if (this.chartInfo.type !== 'point') {
const option = myChart.getOption()
option.series.forEach(item => {
item.symbol = 'emptyCircle'
item.emphasis.itemStyle = {
opacity: 1
}
})
myChart.setOption(option, true)
}
this.tooltip.activeIndex = undefined
})
@@ -450,7 +472,7 @@ export default {
// 鼠标悬浮 series data symbol 时tooltip 中相应的legend 高亮显示
str += `
<div class="${(self.tooltip.activeIndex == item.seriesIndex && self.isGrey.filter(value => value === false).length > 1) ? 'tooltip__row highlight' : 'tooltip__row'}" title="${seriesName}">
<div class="${(self.tooltip.activeIndex == item.seriesIndex) ? 'tooltip__row highlight' : 'tooltip__row'}" title="${seriesName}">
<div class="row__label">
<span class="${className}" style="background-color: ${color};color: ${color}"></span>
<span>${seriesName}</span>

View File

@@ -272,10 +272,12 @@ export default {
this.$emit('clickLegendD3', this.isGrey)
},
hoverLegend (legendName, index, type) {
// legend 已经取消显示,鼠标悬浮,不开启 高亮效果
if (this.isGrey[index]) {
return false
}
if (this.chartInfo.type === 'pie' || this.chartInfo.type === 'doughnut' || this.chartInfo.type === 'rose') {
if (!this.isGrey[index]) {
this.$emit('hoverLegendD3', legendName, index, type)
}
this.$emit('hoverLegendD3', legendName, index, type)
} else if (this.isTimeSeries) {
getChart(this.chartId) && getChart(this.chartId).dispatchAction({
type: type,

View File

@@ -91,6 +91,9 @@ export const chartTimeSeriesLineOption = {
},
axisTick: {
show: false
},
axisPointer: {
snap: true
}
},
yAxis: [
@@ -149,16 +152,27 @@ export const chartTimeSeriesLineOption = {
type: 'line',
symbol: 'emptyCircle', // 去掉点
connectNulls: true,
symbolSize: [2, 2],
symbolSize: [6, 6],
smooth: 0.2, // 曲线变平滑
showSymbol: false,
// showSymbol: false,
itemStyle: {
opacity: 0
},
data: [],
lineStyle: {
width: 1,
opacity: 0.9
},
emphasis: {
focus: 'series'
focus: 'series',
itemStyle: {
opacity: 1
}
},
blur: {
lineStyle: {
opacity: 0.3
}
}
}],
useUTC: false // 使用本地时间