diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index c0bb07d05..46cff7ab0 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -790,13 +790,14 @@ export default { } const val = formatScientificNotation(item.data[1], paramsDot) sum += self.numberWithEConvent(val) + str += '
' str += `
${tip ? (tip.alias ? tip.alias : tip.name) : item.seriesName}
` str += '
' str += chartDataFormat.getUnit(chartInfo.unit ? chartInfo.unit : 2).compute(val, null, -1, paramsDot) if (previousItem) { - str += '' - const previousval = formatScientificNotation(item.data[1], paramsDot) + str += '' + const previousval = formatScientificNotation(previousItem.data[1], paramsDot) let minusVal = 0 if (previousval <= val) { minusVal = val - previousval @@ -1266,7 +1267,7 @@ export default { str += '
' str += chartDataFormat.getUnit(chartInfo.unit ? chartInfo.unit : 2).compute(val, null, self.chartDot) if (previousItem) { - str += '' + str += '' const previousval = formatScientificNotation(previousItem.data[1], 2) let minusVal = 0 if (previousval <= val) { @@ -1578,6 +1579,7 @@ export default { this.echartModalStore.showLoading(); } */ + let self = this let axiosArr = [] this.$nextTick(() => { let startTime = bus.timeFormate(this.searchTime[0], 'yyyy-MM-dd hh:mm:ss') @@ -1685,7 +1687,7 @@ export default { label: { distance: this.computeDistance(chartDataFormat.getUnit(this.data.unit ? this.data.unit : 2).compute(this.data.param.threshold)), formatter: function (params) { - return chartDataFormat.getUnit(this.data.unit ? this.data.unit : 2).compute(params.value) + return chartDataFormat.getUnit(self.data ? self.data.unit : 2).compute(params.value) } }, lineStyle: { diff --git a/nezha-fronted/src/components/page/dashboard/overview/chart.vue b/nezha-fronted/src/components/page/dashboard/overview/chart.vue index 6afe9776e..e8a55d15b 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/chart.vue +++ b/nezha-fronted/src/components/page/dashboard/overview/chart.vue @@ -450,7 +450,7 @@ export default { str += chartDataFormat.getUnit(this.unit).compute(val, null, -1, dot) const previousItem = params.find((series) => ('Previous ' + item.seriesName) === series.seriesName) if (previousItem) { - str += '' + str += '' const previousval = formatScientificNotation(previousItem.data[1], dot) let minusVal = 0 if (previousval <= val) {