diff --git a/core/core-frontend/src/views/chart/components/editor/common/TableTooltip.vue b/core/core-frontend/src/views/chart/components/editor/common/TableTooltip.vue
index 0bf1d5fc43..ad11865fdb 100644
--- a/core/core-frontend/src/views/chart/components/editor/common/TableTooltip.vue
+++ b/core/core-frontend/src/views/chart/components/editor/common/TableTooltip.vue
@@ -37,12 +37,12 @@ const sortFunc = (sortParams: SortFuncParam) => {
       if (typeof aValue === 'number') {
         return aValue - bValue
       }
-      return aValue < bValue ? 1 : -1
+      return aValue < bValue ? -1 : 1
     }
     if (typeof aValue === 'number') {
       return bValue - aValue
     }
-    return aValue > bValue ? 1 : -1
+    return aValue > bValue ? -1 : 1
   })
 }
 const sort = (type?) => {