fix(eclwatch): add a multi-scale 24-hour tick formatter#4482
Merged
GordonSmith merged 1 commit intoNov 20, 2025
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a multi-scale 24-hour tick formatter to improve timeline visualization. The change introduces an adaptive tick formatting function that automatically selects appropriate time formats based on the granularity of the data (milliseconds → seconds → minutes → hours → days → months → years), and enables its use in the WUTimeline component.
Key changes:
- Created a new
multiScale24Hours()formatter with adaptive time formatting logic - Added
tickFormatFunc()method to allow custom tick formatting functions in Axis and ReactTimelineSeries - Updated WUTimeline to use the new multi-scale formatter instead of a fixed "%H:%M" format
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/chart/src/timeFormats.ts | New file containing the multiScale24Hours() adaptive formatter implementation |
| packages/chart/src/index.ts | Exports the new timeFormats module |
| packages/chart/src/Axis.ts | Adds tickFormatFunc() method to support custom tick formatting functions |
| packages/timeline/src/ReactTimelineSeries.ts | Adds tickFormatFunc() method that delegates to underlying axis instances |
| packages/eclwatch/src/WUTimeline.ts | Replaces static tickFormat() with tickFormatFunc(multiScale24Hours()) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adds a 24h multiscale tick formatting function to chart/Axis, exposes a tickFormatFunc property in timeline/ReactTimelineSeries, and uses both in eclwatch/WUTimeline Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com>
fc17d83 to
77d640d
Compare
ac285a3 to
136469b
Compare
GordonSmith
approved these changes
Nov 20, 2025
Merged
GordonSmith
pushed a commit
that referenced
this pull request
Nov 20, 2025
adds a 24h multiscale tick formatting function to chart/Axis, exposes a tickFormatFunc property in timeline/ReactTimelineSeries, and uses both in eclwatch/WUTimeline Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adds a 24h multiscale tick formatting function to chart/Axis, exposes a tickFormatFunc property in timeline/ReactTimelineSeries, and uses both in eclwatch/WUTimeline
Checklist:
Testing: