From 0f1bc9846338e1dedb47e0619123d47f30243724 Mon Sep 17 00:00:00 2001 From: Christopher Pruijsen Date: Sat, 12 Sep 2026 09:16:09 +0100 Subject: [PATCH] allow null scale transform (#2451) --- docs/features/scales.md | 4 ++-- src/scales.d.ts | 8 +++++--- test/scales/scales-test.js | 15 +++++++++++++++ test/types-test.js | 23 +++++++++++++++++++++++ 4 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 test/types-test.js diff --git a/docs/features/scales.md b/docs/features/scales.md index c9a494b805..0cfd7ad22c 100644 --- a/docs/features/scales.md +++ b/docs/features/scales.md @@ -621,7 +621,7 @@ Plot.plot({ [Mark transforms](./transforms.md) typically consume values *before* they are passed through scales (_e.g._, when binning). In this case the mark transforms will see the values prior to the scale transform as input, and the scale transform will apply to the *output* of the mark transform. ::: -The **interval** scale option sets an ordinal scale’s **domain** to the start of every interval within the extent of the data. In addition, it implicitly sets the **transform** of the scale to *interval*.floor, rounding values down to the start of each interval. For example, below we generate a time-series bar chart; when an **interval** is specified, missing days are visible. +The **interval** scale option sets an ordinal scale’s **domain** to the start of every interval within the extent of the data. In addition, it implicitly sets the **transform** of the scale to *interval*.floor, rounding values down to the start of each interval. Set **transform** to null to disable this implicit rounding while still using the **interval** to align the domain. For example, below we generate a time-series bar chart; when an **interval** is specified, missing days are visible.