From 2fa2fc1b53fa9cf390cf6ad780d9cfb2bd61aeba Mon Sep 17 00:00:00 2001 From: wisonic Date: Mon, 9 Dec 2024 17:39:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=95=A3=E7=82=B9=E5=9B=BE=E5=92=8C=E8=B1=A1=E9=99=90=E5=9B=BE?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/others/quadrant.ts | 5 +++++ .../views/chart/components/js/panel/charts/others/scatter.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts index cb15ae690f..3162c22a53 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts @@ -198,6 +198,11 @@ export class Quadrant extends G2PlotChartView { }) const baseOptions: ScatterOptions = { colorField: 'field', + meta: { + field: { + type: 'cat' + } + }, quadrant: { ...defaultBaselineQuadrant }, diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts index 9eda92c8b3..ea449732f3 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts @@ -108,6 +108,11 @@ export class Scatter extends G2PlotChartView { xField: 'field', yField: 'value', colorField: 'category', + meta: { + field: { + type: 'cat' + } + }, appendPadding: getPadding(chart), interactions: [ {