Enhancements/address GitHub issues#140
Merged
Merged
Conversation
Design for GitHub issue #114: pinch-to-zoom, single-finger pan, and zoom reset button for touch devices when inside zoom is enabled.
6-task TDD plan covering pointer tracking, single-finger pan, pinch-to-zoom, zoom reset button, coordinator wiring, and manual testing.
#138) Add optional tickFormatter callback to AxisConfig that replaces built-in tick label formatting. Supports value and time axes, with null return to suppress individual labels. - Wire tickFormatter into x-axis and y-axis rendering in renderAxisLabels - Wire into adaptive time x-axis tick computation for correct overlap measurement - Add 7 unit tests covering formatter usage and null suppression - Update docs/api/options.md with API docs and usage examples - Add tick-formatter example page with 4 demo charts - Add example to examples index
Replace generic 0-100 y-axis with temperature data (°C formatter) so y-axis title is visible and labels are compact.
…dress-github-issues
Plans are local design docs and should not be shipped; docs/plans/ is already gitignored. Made-with: Cursor
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.
Description
This PR adds a new
tickFormatteroption toAxisConfigfor fully customizable axis tick label formatting and wires it through the render pipeline, including adaptive time-axis tick computation and label rendering.[page:1] It also introduces a comprehensivetick-formatterexample page demonstrating percentage, duration, custom time, and integer-only axis labels with null-based label suppression, and adds targeted tests to validate formatter behavior on both value and time axes.[page:1] Additionally, it cleans up local design docs from version control by ignoringdocs/plans/and removing previously tracked plan files.[page:1]Type of Change
Related Issues
AxisConfig.tickFormatter.[page:1]tickFormatter) — closes [Feature]: Custom axis tick label formatter #138.[page:1]Highlights
AxisConfig.tickFormatter?: (value: number) => string | nullwith support for both value and time axes, includingnull-based label suppression.[page:1]tickFormatterintorenderAxisLabelsfor x and y axes and intocomputeAdaptiveTimeXAxisTicksso adaptive tick count uses the formatted label widths.[page:1]tick-formatterexample (HTML + TS) showcasing:nullto hide fractional ticks.[page:1]docs/api/options.md) with detailed description and examples fortickFormatter.[page:1]renderAxisLabelsandcomputeAdaptiveTimeXAxisTicksto ensure custom formatters and suppression behavior work correctly for value and time axes.[page:1].gitignoreto excludedocs/plans/and removed tracked plan files from the repo.[page:1]Testing