diff --git a/nezha-fronted/src/components/charts/chart-bar-statistics.vue b/nezha-fronted/src/components/charts/chart-bar-statistics.vue
index 834969a3e..83ac7d33e 100644
--- a/nezha-fronted/src/components/charts/chart-bar-statistics.vue
+++ b/nezha-fronted/src/components/charts/chart-bar-statistics.vue
@@ -98,7 +98,7 @@ import * as echarts from 'echarts'
import { getChart, setChart, getMousePoint } from '../common/js/common'
import chartConfig from '../page/dashboard/overview/chartConfig'
import { randomcolor } from '../common/js/radomcolor/randomcolor'
-import {formatScientificNotation} from "@/components/common/js/tools";
+import {chartResizeTool, formatScientificNotation} from "@/components/common/js/tools";
import chartDataList from '@/components/common/mixin/chartDataList'
export default {
name: 'pieChart', // 饼图 或者 柱状图的统计
@@ -301,7 +301,8 @@ export default {
},
resize (chartItem) {
if (getChart(this.chartIndex)) {
- getChart(this.chartIndex).resize()
+ const divHeight = this.$refs.legendArea.offsetHeight
+ getChart(this.chartIndex).resize({ height: (this.data.height * this.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
}
},
// 设置数据, filter区分
diff --git a/nezha-fronted/src/components/charts/chart-list-group.vue b/nezha-fronted/src/components/charts/chart-list-group.vue
index 4d61a3686..d18f421a4 100644
--- a/nezha-fronted/src/components/charts/chart-list-group.vue
+++ b/nezha-fronted/src/components/charts/chart-list-group.vue
@@ -1569,8 +1569,9 @@ export default {
const that = this
setTimeout(function () {
const itemHeight = item.height
- // 1.元素距离页面顶部的距离
- const mainOffsetTop = ele.offsetTop// offsetTop: 当前元素顶部距离最近父元素顶部的距离,和有没有滚动条没有关系。单位px,只读元素。
+ // 1.元素距离页面顶部的距离 + group的高度
+ const groupHeight = item.groupId ? document.getElementById('chart-' + item.groupId).offsetTop : 0
+ const mainOffsetTop = ele.offsetTop + groupHeight// offsetTop: 当前元素顶部距离最近父元素顶部的距离,和有没有滚动条没有关系。单位px,只读元素。
// 2.元素的高度
const mainHeight = itemHeight// ele.offsetHeight;//itemHeight;
// 3.页面滚动的距离
diff --git a/nezha-fronted/src/components/charts/chart-pie.vue b/nezha-fronted/src/components/charts/chart-pie.vue
index 55b88d92a..e3831dff4 100644
--- a/nezha-fronted/src/components/charts/chart-pie.vue
+++ b/nezha-fronted/src/components/charts/chart-pie.vue
@@ -99,6 +99,7 @@ import { getChart, setChart, getMousePoint } from '../common/js/common'
import chartConfig from '../page/dashboard/overview/chartConfig'
import { randomcolor } from '../common/js/radomcolor/randomcolor'
import chartDataList from '@/components/common/mixin/chartDataList'
+import {chartResizeTool} from "@/components/common/js/tools";
export default {
name: 'pieChart',
components: {
@@ -296,7 +297,8 @@ export default {
},
resize (chartItem) {
if (getChart(this.chartIndex)) {
- getChart(this.chartIndex).resize()
+ const divHeight = this.$refs.legendArea.offsetHeight
+ getChart(this.chartIndex).resize({ height: (this.data.height * this.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
}
},
// 设置数据, filter区分
diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue
index 7bad61f6d..471766df9 100644
--- a/nezha-fronted/src/components/charts/line-chart-block.vue
+++ b/nezha-fronted/src/components/charts/line-chart-block.vue
@@ -1983,7 +1983,8 @@ export default {
},
chartResize () {
if (getChart(this.chartIndex)) {
- getChart(this.chartIndex).resize()
+ const divHeight = this.$refs.legendArea.offsetHeight
+ getChart(this.chartIndex).resize({ height: (this.data.height * this.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
}
}
},
diff --git a/nezha-fronted/src/components/page/config/system.vue b/nezha-fronted/src/components/page/config/system.vue
index 2423c09b8..42f9072f5 100644
--- a/nezha-fronted/src/components/page/config/system.vue
+++ b/nezha-fronted/src/components/page/config/system.vue
@@ -74,8 +74,9 @@
-
-
+
+
+