diff --git a/core/core-backend/src/main/resources/db/desktop/V2.6__ddl.sql b/core/core-backend/src/main/resources/db/desktop/V2.6__ddl.sql index 939728e750..9561f682b3 100644 --- a/core/core-backend/src/main/resources/db/desktop/V2.6__ddl.sql +++ b/core/core-backend/src/main/resources/db/desktop/V2.6__ddl.sql @@ -8,3 +8,10 @@ update data_visualization_info set version = 2; ALTER TABLE `visualization_template` ADD COLUMN `version` int NULL DEFAULT 3 COMMENT '使用资源的版本'; update visualization_template set version = 2; +update + core_chart_view as a, + core_chart_view as b +set + a.x_axis = b.x_axis_ext, + a.x_axis_ext = b.x_axis +where a.id = b.id and a.type = 'table-pivot'; diff --git a/core/core-backend/src/main/resources/db/migration/V2.6__ddl.sql b/core/core-backend/src/main/resources/db/migration/V2.6__ddl.sql index 4262de0620..393a0668c5 100644 --- a/core/core-backend/src/main/resources/db/migration/V2.6__ddl.sql +++ b/core/core-backend/src/main/resources/db/migration/V2.6__ddl.sql @@ -18,4 +18,12 @@ where `id` = '156330103'; UPDATE `area` set `id` = '156330114', `name` = '钱塘区' -where `id` = '156330104'; \ No newline at end of file +where `id` = '156330104'; + +update + core_chart_view as a, + core_chart_view as b +set + a.x_axis = b.x_axis_ext, + a.x_axis_ext = b.x_axis +where a.id = b.id and a.type = 'table-pivot'; diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts index 33e57528c8..74f6d9591e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts @@ -59,7 +59,7 @@ export class TablePivot extends S2ChartView { const { container, chart, chartObj, action } = drawOption const containerDom = document.getElementById(container) - const { xAxis: columnFields, xAxisExt: rowFields, yAxis: valueFields } = chart + const { xAxisExt: columnFields, xAxis: rowFields, yAxis: valueFields } = chart const [c, r, v] = [columnFields, rowFields, valueFields].map(arr => arr.map(i => i.dataeaseName) )