Skip to content

Fix BarChart value label precision - #656

Merged
calesthio merged 1 commit into
OpenMontageInc:mainfrom
dajiaohuang:fix/654-barchart-value-precision
Nov 8, 2026
Merged

calesthio merged 1 commit into
OpenMontageInc:mainfrom
dajiaohuang:fix/654-barchart-value-precision

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Summary

Preserve the precision of fractional values in BarChart value labels so the annotations match the data used to draw each bar.

Related issue

Closes #654

Changes

  • Keep the existing compact one-decimal formatter for axis tick labels.
  • Use a precision-preserving formatter for data value labels.
  • Add a focused contract regression test for fractional values.

Testing

  • npx tsc --noEmit --pretty false (pass)
  • python -m pytest tests/contracts/test_bar_chart_format_contract.py -q (pass)
  • The full contract suite reached 1,199 passed and 7 skipped; 12 unrelated tests require the unavailable google.genai package.

Checklist

  • The change is focused on a single logical concern.
  • I ran the relevant tests locally (make test-contracts / make test) where applicable; the suite is limited by the unavailable optional Google dependency noted above.
  • I updated docs/README if behavior or usage changed; the existing chart contract remains unchanged.
  • No unrelated files (build artifacts, local config) are included in the diff.

SanHsien added a commit to SanHsien/OpenMontage that referenced this pull request Sep 15, 2026
…iage, branch cleanup, and main branch protection

@calesthio calesthio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for separating data-label precision from axis-tick formatting. Reviewed the complete diff against main 63d1087a. The existing K/M abbreviations remain, while smaller fractional values preserve their supplied precision. Validation: focused contract passed; additionally executed the actual production formatter in Node: 0.015, 0.0004 and 1.2345 remain exact, with 1200 still displayed as 1.2K. This is the preferred precise-label fix over #754; consolidate them rather than merging both.

@calesthio calesthio closed this Nov 7, 2026
@calesthio calesthio reopened this Nov 7, 2026
calesthio pushed a commit that referenced this pull request Nov 8, 2026
@calesthio
calesthio merged commit fd9c634 into OpenMontageInc:main Nov 8, 2026
1 check passed
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.

BarChart value labels misstate non-integer data

2 participants