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) {