Skip to content

Add scale tickformat as default formatter for timescales in axes - #438

Merged
mhkeller merged 2 commits into
mainfrom
timeaxis-formattting
Oct 4, 2026
Merged

mhkeller merged 2 commits into
mainfrom
timeaxis-formattting

Conversation

@mhkeller

@mhkeller mhkeller commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Adds a new check in the axis components to use the default k.{dim}Scale.tickFormat if values are dates.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Date-valued band scales can be misclassified as time scales and crash because they lack tickFormat, and the new behavior lacks coverage.

Review effort: Balanced
Findings: 8 Medium severity · 1 Low severity

Open (9)
What changed in this PR

Adds automatic D3 tick formatting for time scales across Cartesian axis components.

Changes:

  • Uses each time scale’s tickFormat when no formatter is provided.
  • Updates SVG and HTML axis variants.
  • Refreshes generated property-table snapshots.
File Description
src/​_components/​AxisX.svelte Adds default time formatting.
src/​_components/​AxisXTop.svelte Adds default time formatting.
src/​_components/​AxisY.svelte Adds default time formatting.
src/​_components/​AxisYRight.svelte Adds default time formatting.
src/​_components/​AxisX.percent-range.html.svelte Updates HTML bottom axis.
src/​_components/​AxisXTop.percent-range.html.svelte Updates HTML top axis.
src/​_components/​AxisY.percent-range.html.svelte Updates HTML left axis.
src/​_components/​AxisYRight.percent-range.html.svelte Updates HTML right axis.
test/​e2e/​component-properties-table.spec.js-snapshots/​Property-table-content-for-components-AxisX-svelte-1.aria.yml Updates AxisX documentation snapshot.
test/​e2e/​component-properties-table.spec.js-snapshots/​Property-table-content-for-components-AxisXTop-svelte-1.aria.yml Updates AxisXTop documentation snapshot.
test/​e2e/​component-properties-table.spec.js-snapshots/​Property-table-content-for-components-AxisY-svelte-1.aria.yml Updates AxisY documentation snapshot.
test/​e2e/​component-properties-table.spec.js-snapshots/​Property-table-content-for-components-AxisYRight-svelte-1.aria.yml Updates AxisYRight documentation snapshot.
test/​e2e/​component-properties-table.spec.js-snapshots/​Property-table-content-for-components-AxisX-percent-range-html-svelte-1.aria.yml Updates HTML AxisX snapshot.
test/​e2e/​component-properties-table.spec.js-snapshots/​Property-table-content-for-components-AxisXTop-percent-range-html-svelte-1.aria.yml Updates HTML AxisXTop snapshot.
test/​e2e/​component-properties-table.spec.js-snapshots/​Property-table-content-for-components-AxisY-percent-range-html-svelte-1.aria.yml Updates HTML AxisY snapshot.
test/​e2e/​component-properties-table.spec.js-snapshots/​Property-table-content-for-components-AxisYRight-percent-range-html-svelte-1.aria.yml Updates HTML AxisYRight snapshot.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/_components/AxisX.svelte Resolved
Comment thread src/_components/AxisXTop.svelte Resolved
Comment thread src/_components/AxisY.svelte Resolved
Comment thread src/_components/AxisYRight.svelte Resolved
Comment thread src/_components/AxisX.svelte Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhkeller
mhkeller marked this pull request as ready for review October 4, 2026 14:48
@mhkeller
mhkeller merged commit 1b0ccde into main Oct 4, 2026
9 checks passed
@mhkeller
mhkeller deleted the timeaxis-formattting branch October 4, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants