From 39f9cf03580fb19fe92204dcb71b615ad18c58cf Mon Sep 17 00:00:00 2001 From: lvisei Date: Wed, 13 Mar 2024 13:03:49 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20quantile=20scale=20=20domain=20shoul?= =?UTF-8?q?d=E2=80=98t=20do=20repeated=20operations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/runtime/scale.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/scale.ts b/src/runtime/scale.ts index 17d3ffd232..fc9d98509d 100644 --- a/src/runtime/scale.ts +++ b/src/runtime/scale.ts @@ -565,7 +565,7 @@ function inferDomainC(values: Primitive[][]) { } function inferDomainO(values: Primitive[][]) { - return inferDomainC(values).sort(); + return values.flat().sort(); } function inferDomainS(values: Primitive[][]) { From fd53f08bfeedac33103106109d7707b2ea40e6d0 Mon Sep 17 00:00:00 2001 From: lvisei Date: Thu, 14 Mar 2024 03:05:12 +0000 Subject: [PATCH 2/2] test: update snapshots --- .../snapshots/static/countries50mWorldMap.svg | 4 ++-- .../static/salaryHeatmapScaleQuantile.svg | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/__tests__/integration/snapshots/static/countries50mWorldMap.svg b/__tests__/integration/snapshots/static/countries50mWorldMap.svg index 76ca4500c2..2ed48ac21d 100644 --- a/__tests__/integration/snapshots/static/countries50mWorldMap.svg +++ b/__tests__/integration/snapshots/static/countries50mWorldMap.svg @@ -84,7 +84,7 @@ @@ -99,7 +99,7 @@ diff --git a/__tests__/integration/snapshots/static/salaryHeatmapScaleQuantile.svg b/__tests__/integration/snapshots/static/salaryHeatmapScaleQuantile.svg index 684bd79bee..4ae2f1cb94 100644 --- a/__tests__/integration/snapshots/static/salaryHeatmapScaleQuantile.svg +++ b/__tests__/integration/snapshots/static/salaryHeatmapScaleQuantile.svg @@ -15,10 +15,10 @@ y2="6" > - - - - + + + + @@ -238,7 +238,7 @@ @@ -259,7 +259,7 @@ @@ -337,7 +337,7 @@ @@ -366,7 +366,7 @@ @@ -2164,7 +2164,7 @@