Skip to content

fix(chart-line): adaptive y-axis tick precision for small decimal ranges - #233

Merged
Aarebecca merged 5 commits into
mainfrom
copilot/fix-axis-value-display-issue
Apr 15, 2026
Merged

Aarebecca merged 5 commits into
mainfrom
copilot/fix-axis-value-display-issue

Conversation

Copilot AI commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor
  • Run npm run version to bump version
  • package.json: 0.2.16 → 0.2.17
  • src/version.ts: VERSION = '0.2.17'
Copilot AI linked an issue Apr 14, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix discontinuous value display on vertical axis Apr 14, 2026
Copilot AI requested a review from Aarebecca April 14, 2026 08:22
@Aarebecca

Copy link
Copy Markdown
Contributor

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces dynamic tick formatting for the Y-axis in the ChartLine component, replacing a hardcoded check for integers. The reviewer suggests using D3's built-in tickFormat method instead of manual step and precision calculations to ensure idiomatic usage and better handling of floating-point precision issues.

Comment thread src/designs/structures/chart-line.tsx Resolved
@Aarebecca
Aarebecca marked this pull request as ready for review April 14, 2026 11:27
@codecov-commenter

codecov-commenter commented Apr 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.85%. Comparing base (59a231f) to head (3bd8a87).

Files with missing lines Patch % Lines
src/designs/structures/chart-line.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
- Coverage   46.85%   46.85%   -0.01%     
==========================================
  Files         342      342              
  Lines       28416    28417       +1     
  Branches     2400     2400              
==========================================
  Hits        13315    13315              
- Misses      15088    15089       +1     
  Partials       13       13              
Flag Coverage Δ
infographic 46.85% <33.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/version.ts 100.00% <100.00%> (ø)
src/designs/structures/chart-line.tsx 3.38% <0.00%> (-0.01%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Agent-Logs-Url: https://github.com/antvis/Infographic/sessions/a166fa68-300b-40e6-a9b2-7936ce472830

Co-authored-by: Aarebecca <25787943+Aarebecca@users.noreply.github.com>
@Aarebecca
Aarebecca merged commit df8dd57 into main Apr 15, 2026
3 checks passed
@Aarebecca
Aarebecca deleted the copilot/fix-axis-value-display-issue branch April 15, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants