From 477c3462127abc52a8333ce05932081aca21732c Mon Sep 17 00:00:00 2001 From: islxyqwe Date: Tue, 7 May 2024 11:52:56 +0800 Subject: [PATCH] fix: sort nominal domain --- packages/graphic-walker/src/components/painter/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graphic-walker/src/components/painter/index.tsx b/packages/graphic-walker/src/components/painter/index.tsx index 26aad3e5..ab50cc21 100644 --- a/packages/graphic-walker/src/components/painter/index.tsx +++ b/packages/graphic-walker/src/components/painter/index.tsx @@ -350,7 +350,7 @@ const AggPainterContent = (props: { ); rerender(); }; - const handleDraw = (e: ScenegraphEvent, item: Item | null | undefined) => { + const handleDraw = (e: ScenegraphEvent) => { e.stopPropagation(); e.preventDefault(); const paint = (x: number, y: number) => { @@ -921,7 +921,7 @@ const Painter = ({ themeConfig, themeKey }: { themeConfig?: GWGlobalConfig; them }; } else { const res = await fieldStat(compuation, f, { range: false, values: true, valuesMeta: false }, allFields); - const value = res.values.map((x) => x.value); + const value = res.values.map((x) => x.value).sort(); return { domain: { type: 'nominal',