From b4132b54ca67217f706c512c921bf70f86302e31 Mon Sep 17 00:00:00 2001 From: Scott Rhamy Date: Sun, 11 Jan 2026 09:01:17 -0500 Subject: [PATCH 1/5] fix for empty layers toggle showing small circle --- docs/src/routes/docs/components/[name]/+layout.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/routes/docs/components/[name]/+layout.svelte b/docs/src/routes/docs/components/[name]/+layout.svelte index 6d4b92132..cd50a4c2b 100644 --- a/docs/src/routes/docs/components/[name]/+layout.svelte +++ b/docs/src/routes/docs/components/[name]/+layout.svelte @@ -94,7 +94,7 @@ {page.params.example?.replaceAll('-', ' ') ?? metadata.name} - {#if layers} + {#if layers?.length} Date: Wed, 14 Jan 2026 17:10:43 -0500 Subject: [PATCH 2/5] New barchart-xinterval-xinset and linechart-tickspacing - updates to Axis.md and BarChart.md text - updated Scatterplot domain-nice to use Switch instead of autotoggling --- docs/src/content/components/Axis.md | 14 ++++++++ docs/src/content/components/BarChart.md | 4 +++ .../Axis/barchart-xinterval-xinset.svelte | 32 +++++++++++++++++++ .../Axis/linechart-tickspacing.svelte | 24 ++++++++++++++ .../ScatterChart/domain-nice.svelte | 10 +++--- 5 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 docs/src/examples/components/Axis/barchart-xinterval-xinset.svelte create mode 100644 docs/src/examples/components/Axis/linechart-tickspacing.svelte diff --git a/docs/src/content/components/Axis.md b/docs/src/content/components/Axis.md index 427254273..d72e09837 100644 --- a/docs/src/content/components/Axis.md +++ b/docs/src/content/components/Axis.md @@ -9,6 +9,20 @@ related: [Grid, Rule] :example{ name="placement-bottom-left" showCode } +## xAxis timescale tickSpacing + +When the xAxis is a time scale it can get crowded very quickly. You can use `tickSpacing={...}` to add more space between ticks. + +:example{ name="linechart-tickspacing" showCode } + +## BarCharts + +When creating time-series bar charts, it can be useful to use a time scale axis instead of a bar scale axis. This helps show gaps in data (such as on [weekends](/docs/components/BarChart/time-scale-interval)) and provides improved axis ticks. + +To enable this, you must define the interval (daily, hourly, etc) of your data using [d3-time interval](https://d3js.org/d3-time), such as `xInterval={timeDay}`. Since band padding is not available when not using a band scale, you can leverage `xInset={...}` to add padding between bars. + +:example{ name="barchart-xinterval-xinset" showCode } +