From ceaf09d596c89490691d39cfa47ff3c782fb7a51 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 8 Apr 2024 10:06:42 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-3434=20=20fix:=E4=BF=AE=E5=A4=8DChart=20Dat?= =?UTF-8?q?aLink=E5=8F=98=E9=87=8F=E6=9B=BF=E6=8D=A2=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chart/chart-table.vue | 4 ---- .../components/chart/chart/uplot/chartTimeSeriesMixin.js | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/chart/chart/chart-table.vue b/nezha-fronted/src/components/chart/chart/chart-table.vue index cef14d34c..dcea814bd 100644 --- a/nezha-fronted/src/components/chart/chart/chart-table.vue +++ b/nezha-fronted/src/components/chart/chart/chart-table.vue @@ -237,7 +237,6 @@ export default { this.seriesItem = this.filterShowData(this.storedTableData, this.pageObj, 'series') }, filterShowData (source, pageObj, from) { - console.log(123123123) let orderBy = null let sourceData = null if (from === 'series') { @@ -252,11 +251,9 @@ export default { source = Object.assign([], sourceData) } else { // 排序之后的顺序 if (orderBy.order === 'ascending') { - console.log(source) source = source.sort(this.$tableSet.asce(orderBy.prop, true)) } if (orderBy.order === 'descending') { - console.log(source) source = source.sort(this.$tableSet.desc(orderBy.prop, true)) } } @@ -607,7 +604,6 @@ export default { }, // 数据排序 tableDataSort (item) { - console.log(item) this.orderBy = { order: item.order, prop: item.prop } this.seriesItem = this.filterShowData(this.storedTableData, this.pageObj, 'series') }, diff --git a/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeriesMixin.js b/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeriesMixin.js index 9896a11b7..8eea9a440 100644 --- a/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeriesMixin.js +++ b/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeriesMixin.js @@ -190,6 +190,7 @@ export default { label: alias, scale: isRight ? 'right' : 'left', // right yAxisIndex: isRight, // right + labels: series.metric ? series.metric : {}, // values: (u, v) => series.elements.name + JSON.stringify(series.metric), width: 1 / devicePixelRatio, expressionIndex: series.expressionIndex, @@ -680,6 +681,7 @@ export default { className = 'yAxis-icon nz-icon nz-icon-youzongzhou' } const color = this.colorList[params.seriesIndex] + const showValue = chartDataFormat.getUnit(unit).compute(val, null, -1, decimals) this.toolbox.tooltipHtml = `
${bus.timeFormate(tData)}
@@ -689,13 +691,15 @@ export default { ${seriesName}
- ${chartDataFormat.getUnit(unit).compute(val, null, -1, decimals)} + ${showValue}
` this.toolbox.show = true this.toolbox.metric.labels = this.series[params.seriesIndex].labels + this.toolbox.metric.labels.showValue = showValue + this.toolbox.metric.labels.value = val this.toolbox.metric.expressionIndex = this.series[params.seriesIndex].expressionIndex this.toolbox.clickIndex = params.seriesIndex },