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 },