Merge branch 'dev-3.8' of git.mesalab.cn:nezha/nezha-fronted into dev-3.9
This commit is contained in:
@@ -185,6 +185,7 @@ export default {
|
|||||||
chartOption.grid.top = 70
|
chartOption.grid.top = 70
|
||||||
chartOption.toolbox.top = 20
|
chartOption.toolbox.top = 20
|
||||||
}
|
}
|
||||||
|
|
||||||
this.legends = []
|
this.legends = []
|
||||||
this.series = chartOption.series = this.handleTimeSeries(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends
|
this.series = chartOption.series = this.handleTimeSeries(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends
|
||||||
|
|
||||||
@@ -209,6 +210,23 @@ export default {
|
|||||||
chartOption.xAxis.axisLabel.formatter = this.xAxisLabelFormatter(minTime, maxTime)// 需转为毫秒
|
chartOption.xAxis.axisLabel.formatter = this.xAxisLabelFormatter(minTime, maxTime)// 需转为毫秒
|
||||||
chartOption.tooltip.formatter = this.tooltipFormatter(this.chartInfo.param.stack)
|
chartOption.tooltip.formatter = this.tooltipFormatter(this.chartInfo.param.stack)
|
||||||
chartOption.tooltip.position = this.tooltipPosition
|
chartOption.tooltip.position = this.tooltipPosition
|
||||||
|
if (this.isFullscreen) {
|
||||||
|
chartOption.grid.bottom = 50
|
||||||
|
chartOption.dataZoom = [
|
||||||
|
{
|
||||||
|
type: 'inside',
|
||||||
|
start: 0,
|
||||||
|
end: 100,
|
||||||
|
zoomOnMouseWheel: 'shift'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
start: 0,
|
||||||
|
end: 100,
|
||||||
|
bottom: 15,
|
||||||
|
labelFormatter: this.xAxisLabelFormatter(minTime, maxTime)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
if (navigator.userAgent.match(/Mobi/i) ||
|
if (navigator.userAgent.match(/Mobi/i) ||
|
||||||
navigator.userAgent.match(/Android/i) ||
|
navigator.userAgent.match(/Android/i) ||
|
||||||
navigator.userAgent.match(/iPhone/i)) {
|
navigator.userAgent.match(/iPhone/i)) {
|
||||||
@@ -317,11 +335,13 @@ export default {
|
|||||||
this.tooltip.activeIndex = undefined
|
this.tooltip.activeIndex = undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
// 修复echarts bug(dataZoom设置为inside 未按住shift 页面无法滚动)
|
if (!this.isFullscreen) {
|
||||||
// 监听按键按下事件
|
// 修复echarts bug(dataZoom设置为inside 未按住shift 页面无法滚动)
|
||||||
document.addEventListener('keydown', this.keydown)
|
// 监听按键按下事件
|
||||||
// 监听按键松开事件
|
document.addEventListener('keydown', this.keydown)
|
||||||
document.addEventListener('keyup', this.keyup)
|
// 监听按键松开事件
|
||||||
|
document.addEventListener('keyup', this.keyup)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.chartLoading = false
|
this.chartLoading = false
|
||||||
this.isInit = false
|
this.isInit = false
|
||||||
@@ -396,8 +416,7 @@ export default {
|
|||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return [tData.getFullYear(), tData.getMonth() + 1, tData.getDate()].join('/') + '\n' +
|
return [tData.getFullYear(), tData.getMonth() + 1, tData.getDate()].join('/') + '\n' + [hour, minute].join(':')
|
||||||
[hour, minute].join(':')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user