diff --git a/nezha-fronted/src/components/chart/chart/chartRank.vue b/nezha-fronted/src/components/chart/chart/chartRank.vue
new file mode 100644
index 000000000..15b4fc3a8
--- /dev/null
+++ b/nezha-fronted/src/components/chart/chart/chartRank.vue
@@ -0,0 +1,314 @@
+
+
+
diff --git a/nezha-fronted/src/components/chart/chart/chartSankey.vue b/nezha-fronted/src/components/chart/chart/chartSankey.vue
index 05cc55b72..8eae842f0 100644
--- a/nezha-fronted/src/components/chart/chart/chartSankey.vue
+++ b/nezha-fronted/src/components/chart/chart/chartSankey.vue
@@ -1,6 +1,6 @@
{
originalData.forEach((data, dataIndex) => {
- this.isNoData = false
const value = getMetricTypeValue(data.values, chartInfo.param.statistics)
const obj = {
value: value,
diff --git a/nezha-fronted/src/components/chart/chart/tools.js b/nezha-fronted/src/components/chart/chart/tools.js
index cbb1fbfa7..d91b5baf0 100644
--- a/nezha-fronted/src/components/chart/chart/tools.js
+++ b/nezha-fronted/src/components/chart/chart/tools.js
@@ -71,6 +71,9 @@ export function isChartPie (type) {
export function isChartBubble (type) {
return type === chartType.bubble
}
+export function isChartRank (type) {
+ return type === chartType.rank
+}
export function isChartBar (type) {
return type === chartType.bar
}
diff --git a/nezha-fronted/src/components/common/js/constants.js b/nezha-fronted/src/components/common/js/constants.js
index 5077b18ab..24fd557a9 100644
--- a/nezha-fronted/src/components/common/js/constants.js
+++ b/nezha-fronted/src/components/common/js/constants.js
@@ -411,6 +411,7 @@ export const chartType = {
sankey: 'sankey',
pie: 'pie',
bubble: 'bubble',
+ rank: 'rank',
treemap: 'treemap',
log: 'log',
text: 'text',
diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
index 502dba41c..2cb2fe53a 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
+++ b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
@@ -1020,6 +1020,10 @@ export default {
id: 'bubble',
name: this.$t('dashboard.panel.chartForm.typeVal.bubble.label')
},
+ {
+ id: 'rank',
+ name: this.$t('dashboard.panel.chartForm.typeVal.rank.label')
+ },
{
id: 'log',
name: this.$t('dashboard.panel.chartForm.typeVal.log.label')
@@ -1107,7 +1111,8 @@ export default {
case 'gauge':
case 'sankey':
case 'bubble':
- if (this.oldType === 'stat' || this.oldType === 'gauge' || this.oldType === 'sankey' || this.oldType === 'hexagon' || this.oldType === 'bubble') {
+ case 'rank':
+ if (this.oldType === 'stat' || this.oldType === 'gauge' || this.oldType === 'sankey' || this.oldType === 'hexagon' || this.oldType === 'bubble' || this.oldType === 'rank') {
break
}
this.chartConfig.param = {
diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js b/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js
index 086b64b6a..f7fab3c28 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js
+++ b/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js
@@ -56,6 +56,7 @@ export default {
case 'gauge':
case 'pie':
case 'bubble':
+ case 'rank':
return false
default: return false
}
@@ -74,6 +75,7 @@ export default {
case 'gauge':
case 'pie':
case 'bubble':
+ case 'rank':
case 'sankey':
return true
default: return false
@@ -94,6 +96,7 @@ export default {
case 'gauge':
case 'sankey':
case 'bubble':
+ case 'rank':
return false
default: return false
}
@@ -112,6 +115,7 @@ export default {
case 'treemap':
case 'pie':
case 'bubble':
+ case 'rank':
case 'bar':
return false
default: return false
@@ -141,6 +145,7 @@ export default {
case 'treemap':
case 'pie':
case 'bubble':
+ case 'rank':
return true
default: return false
}
@@ -152,6 +157,7 @@ export default {
case 'treemap':
case 'pie':
case 'bubble':
+ case 'rank':
case 'stat':
case 'hexagon':
case 'gauge':
@@ -171,6 +177,7 @@ export default {
case 'treemap':
case 'pie':
case 'bubble':
+ case 'rank':
case 'stat':
case 'hexagon':
case 'gauge':
@@ -204,6 +211,7 @@ export default {
case 'treemap':
case 'pie':
case 'bubble':
+ case 'rank':
case 'stat':
case 'hexagon':
case 'gauge':
diff --git a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js
index b17fee045..c8b8de30e 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js
+++ b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js
@@ -263,6 +263,10 @@ export default {
id: 'bubble',
name: this.$t('dashboard.panel.chartForm.typeVal.bubble.label')
},
+ {
+ id: 'rank',
+ name: this.$t('dashboard.panel.chartForm.typeVal.rank.label')
+ },
{
id: 'table',
name: this.$t('dashboard.panel.chartForm.typeVal.table.label')
@@ -314,6 +318,10 @@ export default {
id: 'bubble',
name: this.$t('dashboard.panel.chartForm.typeVal.bubble.label')
},
+ {
+ id: 'rank',
+ name: this.$t('dashboard.panel.chartForm.typeVal.rank.label')
+ },
{
id: 'log',
name: this.$t('dashboard.panel.chartForm.typeVal.log.label')
diff --git a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
index ecb2e30d4..28cac6a6a 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
+++ b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
@@ -888,6 +888,10 @@ export default {
id: 'bubble',
name: this.$t('dashboard.panel.chartForm.typeVal.bubble.label')
},
+ {
+ id: 'rank',
+ name: this.$t('dashboard.panel.chartForm.typeVal.rank.label')
+ },
{
id: 'gauge',
name: this.$t('dashboard.panel.chartForm.typeVal.gauge.label')
@@ -954,7 +958,8 @@ export default {
case 'hexagon':
case 'gauge':
case 'bubble':
- if (this.oldType === 'stat' || this.oldType === 'gauge' || this.oldType === 'hexagon' || this.oldType === 'bubble') {
+ case 'rank':
+ if (this.oldType === 'stat' || this.oldType === 'gauge' || this.oldType === 'hexagon' || this.oldType === 'bubble' || this.oldType === 'rank') {
break
}
this.chartConfig.param = {