diff --git a/nezha-fronted/src/components/page/dashboard/overview/chart.vue b/nezha-fronted/src/components/page/dashboard/overview/chart.vue index c7c107879..35fcfd398 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/chart.vue +++ b/nezha-fronted/src/components/page/dashboard/overview/chart.vue @@ -58,9 +58,10 @@ created() { this.option=chartConfig.getOption(this.chartType); if(this.chartType==='ruleBar'){ + this.option.yAxis.position='right'; this.option.yAxis.axisLabel.formatter=function(value) { - if (value.length > 12) { - return value.substring(0, 12) + "..."; + if (value.length > 15) { + return value.substring(0, 15) + "..."; }else{ return value } diff --git a/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue b/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue index edc92868a..6194d86e9 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue +++ b/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue @@ -203,8 +203,8 @@ }, grid: { top: 60, - left: 100, - right: 30, + left: 30, + right: 120, bottom: 60, }, series: [], @@ -224,7 +224,8 @@ axisLabel: { show:true, fontSize: 14 - } + }, + inverse:true }, yAxis: { type: 'category', diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview2.scss b/nezha-fronted/src/components/page/dashboard/overview/overview2.scss index d76bc995f..a8fa46262 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/overview2.scss +++ b/nezha-fronted/src/components/page/dashboard/overview/overview2.scss @@ -395,6 +395,9 @@ font-weight: 600; padding-bottom: 10px; } +.yAxis-text-style{ + white-space: nowrap; +} .overview { .tooltip--row { display: flex; diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview2.vue b/nezha-fronted/src/components/page/dashboard/overview/overview2.vue index e7e79b244..0f8197da6 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/overview2.vue +++ b/nezha-fronted/src/components/page/dashboard/overview/overview2.vue @@ -196,7 +196,7 @@ -
+