From 5fe2e9ef2a900d1ae7adeeee127186727b16cc7a Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Thu, 13 Nov 2025 18:34:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=9B=BE=E8=A1=A8=E8=BD=B4=E7=BA=BF=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E8=87=AA=E5=8A=A8=E6=97=8B=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/panel/charts/g2/bar/stock-line.ts | 10 +--------- .../js/panel/charts/g2/line/area.ts | 10 +--------- .../components/js/panel/charts/g2/mix/mix.ts | 10 +--------- .../js/panel/charts/g2/relation/quadrant.ts | 20 ++----------------- .../js/panel/charts/g2/relation/scatter.ts | 10 +--------- .../js/panel/charts/g2/table/t-heatmap.ts | 20 ++----------------- 6 files changed, 8 insertions(+), 72 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/stock-line.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/stock-line.ts index a2afb83c73..fa9b3088ed 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/stock-line.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/stock-line.ts @@ -454,15 +454,7 @@ export class StockLine extends G2ChartView { gridStrokeOpacity: 1, gridLineWidth: yAxis.splitLine.lineStyle.width, gridLineDash, - transform: yAxis.axisLabel.rotate - ? [ - { - type: 'rotate', - optionalAngles: [yAxis.axisLabel.rotate], - recoverWhenFailed: false - } - ] - : [], + labelTransform: `rotate(${yAxis.axisLabel.rotate || 0})`, labelFormatter: d => { return valueFormatter(d, yAxis.axisLabelFormatter) } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/line/area.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/line/area.ts index 760452c946..6c074ffee5 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/line/area.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/line/area.ts @@ -408,15 +408,7 @@ export class Area extends G2ChartView { gridStrokeOpacity: 1, gridLineWidth: yAxis.splitLine.lineStyle.width, gridLineDash, - transform: yAxis.axisLabel.rotate - ? [ - { - type: 'rotate', - optionalAngles: [yAxis.axisLabel.rotate], - recoverWhenFailed: false - } - ] - : [], + labelTransform: `rotate(${yAxis.axisLabel.rotate || 0})`, labelFormatter: d => { return valueFormatter(d, yAxis.axisLabelFormatter) } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix.ts index 356f3fcc0c..bdf3991253 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix.ts @@ -512,15 +512,7 @@ export class ColumnLineMix extends G2ChartView { gridStrokeOpacity: 1, gridLineWidth: xAxis.splitLine.lineStyle.width, gridLineDash, - transform: xAxis.axisLabel.rotate - ? [ - { - type: 'rotate', - optionalAngles: [xAxis.axisLabel.rotate], - recoverWhenFailed: false - } - ] - : [] + labelTransform: `rotate(${xAxis.axisLabel.rotate || 0})` } } } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/relation/quadrant.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/relation/quadrant.ts index f99df03553..724814bf04 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/relation/quadrant.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/relation/quadrant.ts @@ -317,15 +317,7 @@ export class Quadrant extends G2ChartView { gridStrokeOpacity: 1, gridLineWidth: xAxis.splitLine.lineStyle.width, gridLineDash, - transform: xAxis.axisLabel.rotate - ? [ - { - type: 'rotate', - optionalAngles: [xAxis.axisLabel.rotate], - recoverWhenFailed: false - } - ] - : [] + labelTransform: `rotate(${xAxis.axisLabel.rotate || 0})` } } } @@ -398,15 +390,7 @@ export class Quadrant extends G2ChartView { gridStrokeOpacity: 1, gridLineWidth: yAxis.splitLine.lineStyle.width, gridLineDash, - transform: yAxis.axisLabel.rotate - ? [ - { - type: 'rotate', - optionalAngles: [yAxis.axisLabel.rotate], - recoverWhenFailed: false - } - ] - : [], + labelTransform: `rotate(${yAxis.axisLabel.rotate || 0})`, labelFormatter: d => { return valueFormatter(d, yAxis.axisLabelFormatter) } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/relation/scatter.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/relation/scatter.ts index 5e63860acf..686cb6c894 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/relation/scatter.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/relation/scatter.ts @@ -457,15 +457,7 @@ export class Scatter extends G2ChartView { gridStrokeOpacity: 1, gridLineWidth: yAxis.splitLine.lineStyle.width, gridLineDash, - transform: yAxis.axisLabel.rotate - ? [ - { - type: 'rotate', - optionalAngles: [yAxis.axisLabel.rotate], - recoverWhenFailed: false - } - ] - : [], + labelTransform: `rotate(${yAxis.axisLabel.rotate || 0})`, labelFormatter: d => { return valueFormatter(d, yAxis.axisLabelFormatter) } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/table/t-heatmap.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/table/t-heatmap.ts index ed4cb53cfd..9ce519d9b0 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/table/t-heatmap.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/table/t-heatmap.ts @@ -406,15 +406,7 @@ export class TableG2Chart extends G2ChartView { label: xAxis.axisLabel.show, labelFill: xAxis.axisLabel.color, labelFontSize: xAxis.axisLabel.fontSize, - transform: xAxis.axisLabel.rotate - ? [ - { - type: 'rotate', - optionalAngles: [xAxis.axisLabel.rotate], - recoverWhenFailed: false - } - ] - : [] + labelTransform: `rotate(${xAxis.axisLabel.rotate || 0})` } } } @@ -452,15 +444,7 @@ export class TableG2Chart extends G2ChartView { label: yAxis.axisLabel.show, labelFill: yAxis.axisLabel.color, labelFontSize: yAxis.axisLabel.fontSize, - transform: yAxis.axisLabel.rotate - ? [ - { - type: 'rotate', - optionalAngles: [yAxis.axisLabel.rotate], - recoverWhenFailed: false - } - ] - : [], + labelTransform: `rotate(${yAxis.axisLabel.rotate || 0})`, labelFormatter: d => { const str = toString(d) if (!str) {