统计分析
This commit is contained in:
parent
932c609472
commit
73e409e656
@ -175,7 +175,7 @@ const selectstatAnalysisAttributes = () => {
|
||||
|
||||
const chartContainer = ref<HTMLElement | null>(null)
|
||||
|
||||
const option = reactive({
|
||||
const option = {
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
@ -206,7 +206,7 @@ const option = reactive({
|
||||
left: '3%',
|
||||
right: '3%',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const statAnalysisSelectOptions = reactive({
|
||||
interval: [
|
||||
@ -316,10 +316,9 @@ const getTimeIntervals = (startTimestamp, endTimestamp) => {
|
||||
return count
|
||||
}
|
||||
const statAnalysisOperate = () => {
|
||||
option.tooltip = {}
|
||||
option.xAxis.data = []
|
||||
option.legend.data = []
|
||||
option.series = []
|
||||
chart.value.setOption(option)
|
||||
chart.value.clear()
|
||||
times.forEach((time, index) => {
|
||||
if (time[0] && time[1]) {
|
||||
const requestData = {
|
||||
@ -355,7 +354,7 @@ const historyDataReq = (data, index) => {
|
||||
option.tooltip = {
|
||||
show: true,
|
||||
formatter: function (params) {
|
||||
const x = timestampToTime(xDatas[index][params.dataIndex])
|
||||
const x = timestampToTime(xData[params.dataIndex])
|
||||
return `${params.marker} ${params.seriesName} ${x} : ${params.data}`
|
||||
},
|
||||
}
|
||||
@ -367,8 +366,6 @@ const historyDataReq = (data, index) => {
|
||||
}
|
||||
option.legend.data.push(String(index + 1))
|
||||
option.series.push(seriesData)
|
||||
console.log('🚀 ~ historyReq ~ option:', option)
|
||||
|
||||
chart.value.setOption(option)
|
||||
} else {
|
||||
ElMessage.warning('查询失败1')
|
||||
|
Loading…
Reference in New Issue
Block a user