Skip to content

Round numbers before putting them to DOM#6707

Merged
ckifer merged 1 commit into
mainfrom
round
Nov 30, 2025
Merged

Round numbers before putting them to DOM#6707
ckifer merged 1 commit into
mainfrom
round

Conversation

@PavelVanecek

@PavelVanecek PavelVanecek commented Nov 29, 2025

Copy link
Copy Markdown
Collaborator

Description

Round numbers to 4 decimal places before using them as paths. Also updates all relevant tests.

Related Issue

#6704

Motivation and Context

Something between node22 and node24 changed how floating numbers are calculated and that made our numbers differ somewhere at 10th decimal place. Since we're dealing with pixels we don't care about anything after the decimal dot so I figured we may just as well round it. I tried rounding to 0 decimal places but that creates ton of visual diff (somehow), so I made it 4 decimal places. The tests are now passing at node22, node24, and 25 the same.

I have considered rounding in the test helpers instead but that's an uphill battle.

Summary by CodeRabbit

  • New Features

    • Added automatic rounding of numeric coordinates to improve consistency and predictability in chart rendering.
  • Bug Fixes

    • Reduced floating-point precision artifacts in visualization outputs, resulting in cleaner and more consistent display of pie charts, bar charts, radar charts, and other diagram types.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Nov 29, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This PR introduces a new rounding utility module with round() and roundTemplateLiteral() functions, applies the utility throughout shape components (Polygon, Rectangle, Sector, Trapezoid) and data interpolation, and updates snapshot and test files to reflect the rounded numeric outputs.

Changes

Cohort / File(s) Summary
New Rounding Utility
src/util/round.ts
Adds two new functions: round(num, precision) for numeric rounding with -0 guard, and roundTemplateLiteral as a template literal tag function that rounds numeric interpolations.
Snapshot Manifests
scripts/snapshots/es6Files.txt, scripts/snapshots/libFiles.txt, scripts/snapshots/typesFiles.txt
Updates snapshot lists to include new round utility files: es6/util/round.js, lib/util/round.js, types/util/round.d.ts.
Shape Components - Path Rounding
src/shape/Polygon.tsx, src/shape/Trapezoid.tsx
Imports and applies roundTemplateLiteral to path construction template literals.
Shape Components - Dimension & Path Rounding
src/shape/Rectangle.tsx, src/shape/Sector.tsx
Imports rounding utilities and applies round() to dimensional calculations (width, height, x, y) and roundTemplateLiteral to all SVG path data construction.
Data Utilities
src/util/DataUtils.ts
Imports round and applies it to the result of numeric interpolations in interpolate().
Rounding Utility Tests
test/util/round.spec.ts
New comprehensive test suite covering round() and roundTemplateLiteral() with edge cases (negative numbers, -0, zero, integers, decimals).
Cartesian Chart Tests
test/cartesian/Area.animation.spec.tsx, test/cartesian/Bar.animation.spec.tsx, test/cartesian/Bar.spec.tsx, test/cartesian/ErrorBar.spec.tsx, test/cartesian/Funnel.animation.spec.tsx, test/cartesian/Line.animation.spec.tsx, test/cartesian/ReferenceArea.spec.tsx, test/cartesian/Scatter.animation.spec.tsx
Updates test expectations for SVG path data (d attribute) and coordinate values to reflect rounded numeric outputs.
Cartesian Axis Tests
test/cartesian/XAxis/XAxis.barSize.spec.tsx, test/cartesian/XAxis/XAxis.padding.spec.tsx
Updates test expectations for SVG path data and coordinate strings to use rounded precision.
Chart Component Tests
test/chart/BarChart.spec.tsx, test/chart/PieChart.spec.tsx, test/chart/RadialBarChart.spec.tsx
Updates test expectations for path data (d) and numeric attributes (height, width, x, y) to reflect rounded coordinates.
Legend & Helper Tests
test/component/Legend.spec.tsx, test/helper/expectPieSectors.ts
Updates legend test expectations and modifies expectPieSectors helper to round calculated angles via calculateAngle().
Polar Chart Tests
test/polar/Pie.animation.spec.tsx, test/polar/Pie.spec.tsx, test/polar/PolarAngleAxis.spec.tsx, test/polar/Radar.animation.spec.tsx, test/polar/Radar.spec.tsx, test/polar/RadialBar.animation.spec.tsx, test/polar/RadialBar.spec.tsx
Updates test expectations for SVG path data coordinates and angle values to use rounded precision across all polar chart variations.
Shape Animation Tests
test/shape/Rectangle.animation.spec.tsx
Updates test expectations for animated path sequences to use rounded coordinate values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Areas requiring extra attention:

  • src/util/round.ts — Verify rounding logic correctness, especially handling of negative zero, floating-point precision edge cases, and the template literal tag function implementation
  • src/shape/Rectangle.tsx — Review the application of rounding to dimensions (width, height, x, y) and their reuse in downstream calculations (maxRadius, signs, clockwise)
  • src/util/DataUtils.ts — Confirm that rounding interpolated values is appropriate for all use cases and does not introduce unintended precision loss
  • test/helper/expectPieSectors.ts — Verify the rounding applied to angle calculations aligns with expected precision
  • Sampling of test expectations — Spot-check a few test files to confirm expected values match the actual rounded output from the new rounding functions

Suggested labels

enhancement

Suggested reviewers

  • ckifer

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Round numbers before putting them to DOM' clearly and specifically describes the main change: implementing rounding of numeric values before inserting them into DOM elements.
Description check ✅ Passed The description includes Description, Related Issue, and Motivation and Context sections. However, it's missing 'How Has This Been Tested?', 'Screenshots', 'Types of changes', and 'Checklist' sections from the template.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch round

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/shape/Sector.tsx (1)

177-178: Inconsistent rounding: this path segment is not rounded.

Line 178 uses a plain template literal instead of roundTemplateLiteral, which could produce unrounded cx and cy values in the output path when innerArcAngle < 0 && cornerRadius === 0.

Consider applying rounding here for consistency:

     if (innerArcAngle < 0 && cornerRadius === 0) {
-      return `${path}L${cx},${cy}Z`;
+      return roundTemplateLiteral`${path}L${cx},${cy}Z`;
     }

Note: Since path is already a string (built with roundTemplateLiteral), it will pass through unchanged, while cx and cy will be rounded.

🧹 Nitpick comments (3)
src/util/round.ts (1)

1-29: Rounding helpers match the intended behavior; consider adding explicit return type

round and roundTemplateLiteral correctly implement 4‑decimal rounding and -0 normalization, and the tag logic for interleaving rounded values with template strings is sound.

To better align with your TypeScript guidelines about explicit typing, you could annotate the tag’s return type:

-export function roundTemplateLiteral(strings: TemplateStringsArray, ...values: ReadonlyArray<number | string>) {
+export function roundTemplateLiteral(
+  strings: TemplateStringsArray,
+  ...values: ReadonlyArray<number | string>,
+): string {
test/polar/Radar.animation.spec.tsx (1)

203-213: Radar animation expectations updated consistently; consider future float-tolerance only if needed

The new numeric literals for animated polygon paths, dot positions, and radii correctly reflect the rounded SVG output and keep the animation tests’ structure intact. If floating‑point differences across future Node versions ever resurface, you could optionally loosen these tests (e.g., by rounding radii inside the helpers) rather than comparing raw doubles, but that’s not required for this PR.

Also applies to: 245-295, 277-285, 327-333, 339-345, 349-375, 407-413, 419-425, 431-457, 495-501, 507-513, 519-545, 577-583, 589-615, 621-627

test/polar/Pie.animation.spec.tsx (1)

173-175: Update comment to match canonicalized endAngle assertion

The assertion now checks that the last sector’s endAngle is 0, while the comment still says “should be 360 degrees”. Given the normalization to 0 for a full circle, it would be clearer to align the comment with the behavior:

-  // Also, because the Pie is always a full circle, the end angle of the last sector should be 360 degrees
-  expect(finalAngles[finalAngles.length - 1].endAngle).toBe(0);
+  // Also, because the Pie is always a full circle, the last sector ends at 360 degrees,
+  // which is represented as 0 degrees in the normalized angle space
+  expect(finalAngles[finalAngles.length - 1].endAngle).toBe(0);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d3ccaac and cb1b631.

⛔ Files ignored due to path filters (2)
  • test/cartesian/__snapshots__/ReferenceArea.spec.tsx.snap is excluded by !**/*.snap
  • test/shape/__snapshots__/Sector.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (33)
  • scripts/snapshots/es6Files.txt (1 hunks)
  • scripts/snapshots/libFiles.txt (1 hunks)
  • scripts/snapshots/typesFiles.txt (1 hunks)
  • src/shape/Polygon.tsx (2 hunks)
  • src/shape/Rectangle.tsx (4 hunks)
  • src/shape/Sector.tsx (6 hunks)
  • src/shape/Trapezoid.tsx (1 hunks)
  • src/util/DataUtils.ts (2 hunks)
  • src/util/round.ts (1 hunks)
  • test/cartesian/Area.animation.spec.tsx (1 hunks)
  • test/cartesian/Bar.animation.spec.tsx (7 hunks)
  • test/cartesian/Bar.spec.tsx (33 hunks)
  • test/cartesian/ErrorBar.spec.tsx (2 hunks)
  • test/cartesian/Funnel.animation.spec.tsx (5 hunks)
  • test/cartesian/Line.animation.spec.tsx (5 hunks)
  • test/cartesian/ReferenceArea.spec.tsx (2 hunks)
  • test/cartesian/Scatter.animation.spec.tsx (1 hunks)
  • test/cartesian/XAxis/XAxis.barSize.spec.tsx (3 hunks)
  • test/cartesian/XAxis/XAxis.padding.spec.tsx (10 hunks)
  • test/chart/BarChart.spec.tsx (26 hunks)
  • test/chart/PieChart.spec.tsx (4 hunks)
  • test/chart/RadialBarChart.spec.tsx (4 hunks)
  • test/component/Legend.spec.tsx (4 hunks)
  • test/helper/expectPieSectors.ts (2 hunks)
  • test/polar/Pie.animation.spec.tsx (11 hunks)
  • test/polar/Pie.spec.tsx (6 hunks)
  • test/polar/PolarAngleAxis.spec.tsx (1 hunks)
  • test/polar/Radar.animation.spec.tsx (13 hunks)
  • test/polar/Radar.spec.tsx (2 hunks)
  • test/polar/RadialBar.animation.spec.tsx (6 hunks)
  • test/polar/RadialBar.spec.tsx (3 hunks)
  • test/shape/Rectangle.animation.spec.tsx (2 hunks)
  • test/util/round.spec.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (DEVELOPING.md)

Run type checking on the codebase using npm run check-types

**/*.{ts,tsx}: Never use any type (implicit or explicit) in TypeScript code
Prefer unknown over any and refine the type in TypeScript
Type function parameters and return values explicitly in TypeScript, do not rely on implicit any or inference; exceptions are React components and trivial functions
Do not use as type assertions in TypeScript; the only exception is as const

Files:

  • test/helper/expectPieSectors.ts
  • test/cartesian/Bar.animation.spec.tsx
  • test/polar/Radar.animation.spec.tsx
  • test/shape/Rectangle.animation.spec.tsx
  • test/polar/Pie.spec.tsx
  • src/util/round.ts
  • test/util/round.spec.ts
  • test/cartesian/XAxis/XAxis.padding.spec.tsx
  • test/chart/RadialBarChart.spec.tsx
  • test/polar/PolarAngleAxis.spec.tsx
  • src/shape/Trapezoid.tsx
  • src/shape/Polygon.tsx
  • test/cartesian/Scatter.animation.spec.tsx
  • test/cartesian/Funnel.animation.spec.tsx
  • src/shape/Rectangle.tsx
  • test/chart/PieChart.spec.tsx
  • src/util/DataUtils.ts
  • test/cartesian/ReferenceArea.spec.tsx
  • src/shape/Sector.tsx
  • test/component/Legend.spec.tsx
  • test/cartesian/Area.animation.spec.tsx
  • test/polar/RadialBar.animation.spec.tsx
  • test/cartesian/Bar.spec.tsx
  • test/polar/RadialBar.spec.tsx
  • test/cartesian/Line.animation.spec.tsx
  • test/polar/Radar.spec.tsx
  • test/chart/BarChart.spec.tsx
  • test/cartesian/XAxis/XAxis.barSize.spec.tsx
  • test/cartesian/ErrorBar.spec.tsx
  • test/polar/Pie.animation.spec.tsx
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Ensure code lints by running npm run lint and follows Airbnb's Style Guide

Files:

  • test/helper/expectPieSectors.ts
  • test/cartesian/Bar.animation.spec.tsx
  • test/polar/Radar.animation.spec.tsx
  • test/shape/Rectangle.animation.spec.tsx
  • test/polar/Pie.spec.tsx
  • src/util/round.ts
  • test/util/round.spec.ts
  • test/cartesian/XAxis/XAxis.padding.spec.tsx
  • test/chart/RadialBarChart.spec.tsx
  • test/polar/PolarAngleAxis.spec.tsx
  • src/shape/Trapezoid.tsx
  • src/shape/Polygon.tsx
  • test/cartesian/Scatter.animation.spec.tsx
  • test/cartesian/Funnel.animation.spec.tsx
  • src/shape/Rectangle.tsx
  • test/chart/PieChart.spec.tsx
  • src/util/DataUtils.ts
  • test/cartesian/ReferenceArea.spec.tsx
  • src/shape/Sector.tsx
  • test/component/Legend.spec.tsx
  • test/cartesian/Area.animation.spec.tsx
  • test/polar/RadialBar.animation.spec.tsx
  • test/cartesian/Bar.spec.tsx
  • test/polar/RadialBar.spec.tsx
  • test/cartesian/Line.animation.spec.tsx
  • test/polar/Radar.spec.tsx
  • test/chart/BarChart.spec.tsx
  • test/cartesian/XAxis/XAxis.barSize.spec.tsx
  • test/cartesian/ErrorBar.spec.tsx
  • test/polar/Pie.animation.spec.tsx
{test,www/test}/**/*.spec.{ts,tsx}

📄 CodeRabbit inference engine (DEVELOPING.md)

Write unit tests in the test or www/test directories with .spec.tsx file extension

Files:

  • test/cartesian/Bar.animation.spec.tsx
  • test/polar/Radar.animation.spec.tsx
  • test/shape/Rectangle.animation.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/util/round.spec.ts
  • test/cartesian/XAxis/XAxis.padding.spec.tsx
  • test/chart/RadialBarChart.spec.tsx
  • test/polar/PolarAngleAxis.spec.tsx
  • test/cartesian/Scatter.animation.spec.tsx
  • test/cartesian/Funnel.animation.spec.tsx
  • test/chart/PieChart.spec.tsx
  • test/cartesian/ReferenceArea.spec.tsx
  • test/component/Legend.spec.tsx
  • test/cartesian/Area.animation.spec.tsx
  • test/polar/RadialBar.animation.spec.tsx
  • test/cartesian/Bar.spec.tsx
  • test/polar/RadialBar.spec.tsx
  • test/cartesian/Line.animation.spec.tsx
  • test/polar/Radar.spec.tsx
  • test/chart/BarChart.spec.tsx
  • test/cartesian/XAxis/XAxis.barSize.spec.tsx
  • test/cartesian/ErrorBar.spec.tsx
  • test/polar/Pie.animation.spec.tsx
test/**/*.spec.{ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Aim for 100% unit test code coverage when writing new code

Files:

  • test/cartesian/Bar.animation.spec.tsx
  • test/polar/Radar.animation.spec.tsx
  • test/shape/Rectangle.animation.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/util/round.spec.ts
  • test/cartesian/XAxis/XAxis.padding.spec.tsx
  • test/chart/RadialBarChart.spec.tsx
  • test/polar/PolarAngleAxis.spec.tsx
  • test/cartesian/Scatter.animation.spec.tsx
  • test/cartesian/Funnel.animation.spec.tsx
  • test/chart/PieChart.spec.tsx
  • test/cartesian/ReferenceArea.spec.tsx
  • test/component/Legend.spec.tsx
  • test/cartesian/Area.animation.spec.tsx
  • test/polar/RadialBar.animation.spec.tsx
  • test/cartesian/Bar.spec.tsx
  • test/polar/RadialBar.spec.tsx
  • test/cartesian/Line.animation.spec.tsx
  • test/polar/Radar.spec.tsx
  • test/chart/BarChart.spec.tsx
  • test/cartesian/XAxis/XAxis.barSize.spec.tsx
  • test/cartesian/ErrorBar.spec.tsx
  • test/polar/Pie.animation.spec.tsx
test/**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (test/README.md)

test/**/*.{test,spec}.{ts,tsx}: Aim for 100% unit test code coverage when writing new code
Prefer to use the createSelectorTestCase helper function when writing or modifying tests
Use the expectLastCalledWith helper function instead of expect(spy).toHaveBeenLastCalledWith(...) for better typing and autocompletion
Verify the number of selector calls using the spy object from createSelectorTestCase to spot unnecessary re-renders and improve performance
Mock getBoundingClientRect in tests using the helper function provided in test/helper/MockGetBoundingClientRect.ts
Use vi.useFakeTimers() in all tests due to Redux autoBatchEnhancer dependency on timers and requestAnimationFrame
Call vi.runOnlyPendingTimers() to advance timers after renders when not using createSelectorTestCase helper, and avoid vi.runAllTimers() to prevent infinite loops
Use userEvent.setup({ advanceTimers: vi.runOnlyPendingTimers }) or the userEventSetup helper function from test/helper/userEventSetup.ts when creating userEvent instances
When testing tooltips on hover, use vi.runOnlyPendingTimers() after each userEvent.hover() call or use the showTooltip helper function from tooltipTestHelpers.ts to account for requestAnimationFrame delays

Files:

  • test/cartesian/Bar.animation.spec.tsx
  • test/polar/Radar.animation.spec.tsx
  • test/shape/Rectangle.animation.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/util/round.spec.ts
  • test/cartesian/XAxis/XAxis.padding.spec.tsx
  • test/chart/RadialBarChart.spec.tsx
  • test/polar/PolarAngleAxis.spec.tsx
  • test/cartesian/Scatter.animation.spec.tsx
  • test/cartesian/Funnel.animation.spec.tsx
  • test/chart/PieChart.spec.tsx
  • test/cartesian/ReferenceArea.spec.tsx
  • test/component/Legend.spec.tsx
  • test/cartesian/Area.animation.spec.tsx
  • test/polar/RadialBar.animation.spec.tsx
  • test/cartesian/Bar.spec.tsx
  • test/polar/RadialBar.spec.tsx
  • test/cartesian/Line.animation.spec.tsx
  • test/polar/Radar.spec.tsx
  • test/chart/BarChart.spec.tsx
  • test/cartesian/XAxis/XAxis.barSize.spec.tsx
  • test/cartesian/ErrorBar.spec.tsx
  • test/polar/Pie.animation.spec.tsx
**/*.spec.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

When running unit tests, prefer to run a single test file using npm run test -- path/to/TestFile.spec.tsx rather than running all tests with npm test

Files:

  • test/cartesian/Bar.animation.spec.tsx
  • test/polar/Radar.animation.spec.tsx
  • test/shape/Rectangle.animation.spec.tsx
  • test/polar/Pie.spec.tsx
  • test/util/round.spec.ts
  • test/cartesian/XAxis/XAxis.padding.spec.tsx
  • test/chart/RadialBarChart.spec.tsx
  • test/polar/PolarAngleAxis.spec.tsx
  • test/cartesian/Scatter.animation.spec.tsx
  • test/cartesian/Funnel.animation.spec.tsx
  • test/chart/PieChart.spec.tsx
  • test/cartesian/ReferenceArea.spec.tsx
  • test/component/Legend.spec.tsx
  • test/cartesian/Area.animation.spec.tsx
  • test/polar/RadialBar.animation.spec.tsx
  • test/cartesian/Bar.spec.tsx
  • test/polar/RadialBar.spec.tsx
  • test/cartesian/Line.animation.spec.tsx
  • test/polar/Radar.spec.tsx
  • test/chart/BarChart.spec.tsx
  • test/cartesian/XAxis/XAxis.barSize.spec.tsx
  • test/cartesian/ErrorBar.spec.tsx
  • test/polar/Pie.animation.spec.tsx
src/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (DEVELOPING.md)

Run ESLint and Prettier on the codebase using npm run lint

Files:

  • src/util/round.ts
  • src/shape/Trapezoid.tsx
  • src/shape/Polygon.tsx
  • src/shape/Rectangle.tsx
  • src/util/DataUtils.ts
  • src/shape/Sector.tsx
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Do not hardcode any strings or formatting choices in library code; users should provide localized strings as desired

Files:

  • src/util/round.ts
  • src/shape/Trapezoid.tsx
  • src/shape/Polygon.tsx
  • src/shape/Rectangle.tsx
  • src/util/DataUtils.ts
  • src/shape/Sector.tsx
test/component/**/*.spec.tsx

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use React Testing Library for testing component interactions and behavior upon rendering

Files:

  • test/component/Legend.spec.tsx
🧠 Learnings (10)
📚 Learning: 2025-11-25T01:23:08.237Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.237Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Verify the number of selector calls using the spy object from `createSelectorTestCase` to spot unnecessary re-renders and improve performance

Applied to files:

  • test/cartesian/Bar.animation.spec.tsx
  • test/polar/Radar.animation.spec.tsx
  • test/shape/Rectangle.animation.spec.tsx
  • test/chart/RadialBarChart.spec.tsx
  • test/polar/PolarAngleAxis.spec.tsx
  • test/cartesian/Scatter.animation.spec.tsx
  • test/cartesian/Funnel.animation.spec.tsx
  • test/chart/PieChart.spec.tsx
  • test/cartesian/ReferenceArea.spec.tsx
  • test/component/Legend.spec.tsx
  • test/cartesian/Area.animation.spec.tsx
  • test/polar/RadialBar.animation.spec.tsx
  • test/polar/RadialBar.spec.tsx
  • test/cartesian/Line.animation.spec.tsx
  • test/polar/Radar.spec.tsx
  • test/chart/BarChart.spec.tsx
  • test/cartesian/ErrorBar.spec.tsx
  • test/polar/Pie.animation.spec.tsx
📚 Learning: 2025-11-25T01:23:08.237Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.237Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Use the `expectLastCalledWith` helper function instead of `expect(spy).toHaveBeenLastCalledWith(...)` for better typing and autocompletion

Applied to files:

  • test/cartesian/Bar.animation.spec.tsx
  • test/polar/Radar.animation.spec.tsx
  • test/shape/Rectangle.animation.spec.tsx
  • test/cartesian/Funnel.animation.spec.tsx
  • test/polar/RadialBar.animation.spec.tsx
  • test/cartesian/Line.animation.spec.tsx
📚 Learning: 2025-11-25T01:23:08.237Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.237Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Call `vi.runOnlyPendingTimers()` to advance timers after renders when not using `createSelectorTestCase` helper, and avoid `vi.runAllTimers()` to prevent infinite loops

Applied to files:

  • test/polar/Radar.animation.spec.tsx
📚 Learning: 2025-11-25T01:23:08.237Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.237Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : When testing tooltips on hover, use `vi.runOnlyPendingTimers()` after each `userEvent.hover()` call or use the `showTooltip` helper function from `tooltipTestHelpers.ts` to account for requestAnimationFrame delays

Applied to files:

  • test/polar/Radar.animation.spec.tsx
  • test/cartesian/Scatter.animation.spec.tsx
📚 Learning: 2025-11-25T01:22:59.699Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.699Z
Learning: Applies to test/component/**/*.spec.tsx : Use React Testing Library for testing component interactions and behavior upon rendering

Applied to files:

  • test/polar/Radar.animation.spec.tsx
📚 Learning: 2025-11-25T01:23:08.237Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.237Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Mock `getBoundingClientRect` in tests using the helper function provided in `test/helper/MockGetBoundingClientRect.ts`

Applied to files:

  • test/shape/Rectangle.animation.spec.tsx
  • test/util/round.spec.ts
  • test/cartesian/ReferenceArea.spec.tsx
  • test/component/Legend.spec.tsx
📚 Learning: 2025-11-25T01:22:59.699Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.699Z
Learning: Applies to test/**/*.spec.{ts,tsx} : Aim for 100% unit test code coverage when writing new code

Applied to files:

  • test/util/round.spec.ts
📚 Learning: 2025-11-25T01:23:08.237Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.237Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Aim for 100% unit test code coverage when writing new code

Applied to files:

  • test/util/round.spec.ts
📚 Learning: 2025-11-25T01:22:48.279Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: DEVELOPING.md:0-0
Timestamp: 2025-11-25T01:22:48.279Z
Learning: Applies to {test,www/test}/**/*.spec.{ts,tsx} : Write unit tests in the `test` or `www/test` directories with `.spec.tsx` file extension

Applied to files:

  • test/util/round.spec.ts
📚 Learning: 2025-11-25T01:22:59.699Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.699Z
Learning: Applies to storybook/stories/**/*.stories.tsx : Update Storybook stories when APIs have been changed to ensure they work as expected

Applied to files:

  • test/chart/BarChart.spec.tsx
🧬 Code graph analysis (11)
test/helper/expectPieSectors.ts (1)
src/util/round.ts (1)
  • round (4-11)
test/cartesian/Bar.animation.spec.tsx (1)
test/animation/MockProgressAnimationManager.ts (1)
  • prime (137-158)
test/shape/Rectangle.animation.spec.tsx (1)
test/animation/MockProgressAnimationManager.ts (1)
  • prime (137-158)
test/util/round.spec.ts (1)
src/util/round.ts (2)
  • round (4-11)
  • roundTemplateLiteral (18-29)
src/shape/Trapezoid.tsx (1)
src/util/round.ts (1)
  • roundTemplateLiteral (18-29)
src/shape/Polygon.tsx (1)
src/util/round.ts (1)
  • roundTemplateLiteral (18-29)
src/shape/Rectangle.tsx (2)
storybook/stories/API/props/RectangleProps.ts (1)
  • radius (8-21)
src/util/round.ts (2)
  • round (4-11)
  • roundTemplateLiteral (18-29)
test/chart/PieChart.spec.tsx (1)
test/helper/expectPieSectors.ts (1)
  • expectPieSectors (13-20)
src/util/DataUtils.ts (1)
src/util/round.ts (1)
  • round (4-11)
src/shape/Sector.tsx (1)
src/util/round.ts (1)
  • roundTemplateLiteral (18-29)
test/cartesian/Line.animation.spec.tsx (1)
test/helper/expectDots.ts (1)
  • expectDots (6-14)
🪛 Biome (2.1.2)
test/util/round.spec.ts

[error] 48-48: This number literal will lose precision at runtime.

The value at runtime will be 123456789.12345679

(lint/correctness/noPrecisionLoss)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build, Test, Pack
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (49)
test/polar/RadialBar.animation.spec.tsx (1)

72-111: Rounded RadialBar path expectations look consistent with new path formatting

All updated d strings and expected path arrays simply reflect rounded coordinates while preserving path structure and test intent. No behavioral or assertion‑logic regressions spotted.

Also applies to: 88-113, 148-167, 260-283, 325-343

test/polar/PolarAngleAxis.spec.tsx (1)

1351-1352: Polygon axisLine path expectation correctly updated to rounded coordinates

The d attribute now uses rounded coordinates while keeping the same polygon structure and closure (...L250,54Z). This aligns with the new rounding behavior without changing test semantics.

test/polar/RadialBar.spec.tsx (1)

411-429: RadialBar sector path expectations correctly updated for rounded coordinates

The updated d strings preserve the same sector geometry while trimming numeric noise, matching the new rounding utility behavior. Test logic and coverage remain the same.

Also applies to: 797-813, 1049-1059

test/chart/RadialBarChart.spec.tsx (1)

69-88: Rounded sector and bar geometry expectations align with new rendering precision

The modified d path strings, label arc paths, and bar widths are consistent with rounding to a few decimal places while preserving overall geometry and test intent. No behavioral changes to the test suite beyond stricter, cleaner numeric expectations.

Also applies to: 141-160, 222-241, 264-283, 1649-1679, 1797-1825

test/cartesian/ErrorBar.spec.tsx (1)

1649-1679: Bar geometry expectations updated to match rounded widths and path data

The adjusted d attributes and width values now use rounded decimals, consistent with the new rounding behavior, while keeping bar positions and relative sizes intact. ErrorBar logic and axis‑domain tests remain unaffected.

Also applies to: 1797-1827

scripts/snapshots/libFiles.txt (1)

193-233: Snapshot manifest correctly includes new round util

Adding "lib/util/round.js" to libFiles.txt in the util section keeps snapshots aligned with the new exported utility and maintains the existing directory ordering.

test/helper/expectPieSectors.ts (1)

3-3: Pie sector angle helper now uses shared rounding, improving consistency

Importing round and applying it in calculateAngle makes the angle expectations robust to minor FP drift and aligns test calculations with the same rounding used in production SVG paths. The underlying angle math and parsing logic remain correct.

Also applies to: 32-46

scripts/snapshots/es6Files.txt (1)

232-232: LGTM! Snapshot entry for new rounding utility.

The addition of es6/util/round.js correctly tracks the new rounding utility module in the ES6 exports manifest.

src/util/DataUtils.ts (2)

3-3: LGTM! Import for new rounding utility.

The import statement correctly brings in the round function needed for the interpolation rounding below.


108-108: LGTM! Rounding applied to interpolation results.

The addition of round() to the interpolation result is appropriate for SVG/DOM coordinate values and addresses the floating-point precision differences between Node versions mentioned in the PR objectives.

test/cartesian/Scatter.animation.spec.tsx (1)

316-318: LGTM! Test expectations updated for rounded coordinates.

The cy values have been correctly updated to reflect the rounded numeric output from the new rounding utilities. The precision is consistent with the 4-decimal-place rounding applied throughout the PR.

scripts/snapshots/typesFiles.txt (1)

232-232: LGTM! Type declaration snapshot entry.

The addition of types/util/round.d.ts correctly tracks the type declarations for the new rounding utility.

test/component/Legend.spec.tsx (1)

991-1099: LGTM! Test expectations updated for rounded Bar coordinates.

The updated assertions reflect the rounded numeric values produced by the new rounding utilities in the Rectangle/Bar shape components. All values are consistently rounded to 4 decimal places, matching the precision chosen in the PR.

test/cartesian/Funnel.animation.spec.tsx (1)

102-169: LGTM! Funnel trapezoid path expectations updated for rounding.

The SVG path data strings have been correctly updated to reflect the rounded coordinates generated by the roundTemplateLiteral utility used in the Trapezoid shape component. All values consistently use 4-decimal-place precision.

test/cartesian/Bar.animation.spec.tsx (1)

211-442: LGTM! Bar animation expectations updated for rounded values.

The test expectations for heights, y-coordinates, and path data have been correctly updated to match the rounded output from the Rectangle shape component. All values consistently use 4-decimal-place precision, aligning with the rounding utilities introduced in this PR.

The minor wording improvement on line 275 also improves readability.

test/cartesian/Area.animation.spec.tsx (1)

411-412: LGTM! Area dot coordinate expectations updated for rounding.

The cy coordinate strings have been correctly updated to reflect the rounded values produced by the interpolation function in DataUtils. The precision is consistent with the 4-decimal-place rounding applied throughout the PR.

src/shape/Polygon.tsx (1)

9-9: Polygon path rounding via roundTemplateLiteral looks correct

Using roundTemplateLiteral here cleanly rounds only the numeric coordinates while preserving the accumulated path string and command characters, without changing control flow or connectNulls semantics. This aligns with the PR goal of DOM-only rounding.

Also applies to: 52-52

test/polar/Radar.spec.tsx (1)

40-46: Updated Radar polygon d expectations match new rounded path output

The new d strings use the compact M250,167.68L...Z form with rounded coordinates, consistent with Polygon now building paths via roundTemplateLiteral. No behavioral change to the tests beyond formatting.

Also applies to: 60-66

src/shape/Trapezoid.tsx (1)

14-24: Rounding in getTrapezoidPath is consistent and non-invasive

Switching to roundTemplateLiteral for each segment correctly rounds all numeric coordinates while preserving the existing trapezoid geometry and control flow. This keeps Trapezoid aligned with the other rounded shapes.

test/chart/BarChart.spec.tsx (1)

337-447: Bar expectBars snapshots correctly updated for rounded geometry

All modified expectBars cases now assert rounded coordinates and dimensions (up to 4 decimals), matching the new Rectangle/rounding behavior while leaving test intent and chart semantics unchanged. Nothing here suggests functional regressions.

Also applies to: 465-531, 563-629, 647-713, 731-765, 1004-1070, 1106-1172, 1769-1835, 1933-2037, 2192-2407, 2573-2686, 2699-2841, 2854-2919, 2933-2999, 3012-3077, 3092-3156, 3169-3233

test/cartesian/XAxis/XAxis.padding.spec.tsx (1)

122-168: XAxis padding bar expectations aligned with rounded Rectangle output

The modified expectBars expectations for the different padding modes now match the rounded Rectangle geometry (x/y/d/height/width), with no change to how padding logic or selector behavior is tested.

Also applies to: 211-268, 310-367, 409-467, 508-565, 607-665

test/polar/Pie.spec.tsx (1)

60-67: Pie sector angle and path expectations updated for rounding without changing semantics

Rounding pageDataSectorPaths coordinates and the endAngle values in active-shape/event assertions to 4 decimals matches the new Pie/Sector rounding utilities while preserving payload structure and all behavioral checks.

Also applies to: 335-412, 1872-2128

src/shape/Rectangle.tsx (1)

15-25: Rectangle rounding integration looks sound and localized to DOM output

  • roundedWidth/roundedHeight are used only for maxRadius and sign, bringing radius capping in line with the rendered (rounded) dimensions while changing only sub‑pixel cases.
  • Converting all path construction to roundTemplateLiteral and adding rounded x/y/width/height attributes in the non-update branch cleanly normalizes DOM output without altering validation or animation control flow.
  • Animated rectangles still route through getRectanglePath, so their d strings are rounded as well, even though x/y/width/height attributes are omitted there (tests appear to rely on the non-animated cases).

Also applies to: 34-72, 171-184

test/shape/Rectangle.animation.spec.tsx (2)

234-240: Test expectations correctly updated to reflect 4-decimal rounding.

The animated path values (e.g., 127.8959, 139.6508, 144.8153) now reflect the rounding applied by roundTemplateLiteral in Rectangle.tsx. These intermediate animation frames demonstrate consistent precision across Node versions.


332-347: Animation path expectations for both increase and decrease transitions look correct.

The rounded path coordinates maintain visual fidelity while ensuring cross-Node-version consistency. Both the width-increase (lines 334-337) and width-decrease (lines 343-346) animations show proper interpolation with 4-decimal precision.

test/cartesian/ReferenceArea.spec.tsx (3)

99-99: Path data correctly rounded.

The d attribute now uses rounded values consistent with the Rectangle component's rounding implementation.


363-366: Numeric attributes rounded to 4 decimal places.

The x and width attributes now show 112.2727 and 59.0909 respectively, matching the rounding precision applied in the Rectangle component.


434-437: Custom shape elements retain full precision as expected.

When shape is a React Element (line 388), the props are injected directly without going through Rectangle's path rendering, so these attributes (x: '112.27272727272728', width: '59.09090909090909') correctly retain their original precision. This is the expected behavior since only the Rectangle's internal path construction uses rounding.

src/shape/Sector.tsx (3)

9-9: Import of rounding utility is appropriate.

The roundTemplateLiteral import enables consistent numeric rounding across all path string constructions in this file.


59-73: Path construction in getSectorPath correctly uses rounding.

The outer arc path (lines 59-63), inner arc path (lines 68-71), and center fallback (line 73) all use roundTemplateLiteral to ensure consistent numeric precision in the SVG path data.


123-142: Corner radius path segments correctly use rounding.

Both the forceCornerRadius return path (lines 123-126), the main sector path with corners (lines 138-142), and the inner arc segments (lines 181-186) properly apply roundTemplateLiteral for consistent precision.

Also applies to: 181-186

test/cartesian/XAxis/XAxis.barSize.spec.tsx (2)

40-97: Bar position expectations correctly updated with rounded values.

The expected bar attributes (d, height, x, y) now use 4-decimal precision (e.g., 65.8377, 144.8179, 120.5556), consistent with the rounding applied in the Rectangle component's path generation.


211-219: Single data point bar expectations correctly rounded.

These test cases for single data points with various barSize configurations show properly rounded coordinates and dimensions.

Also applies to: 267-275

test/cartesian/Line.animation.spec.tsx (4)

218-218: Stroke-dasharray expectation is correct.

The value '10px 90px' represents the expected stroke-dasharray at 10% animation progress.


371-371: Dashed line stroke-dasharray format updated.

The expected value uses comma separation ('7px, 3px, 0px, 90px') consistent with the dashed stroke animation pattern.


599-627: Animated dot positions correctly show 4-decimal precision.

The cy values during animation (e.g., 32.7794, 38.4836, 40.6985, 46.139) reflect the rounded interpolated coordinates, ensuring consistent output across Node versions.


766-794: Additional animation frame expectations correctly updated.

These dot position expectations maintain the 4-decimal precision pattern throughout the animation tests, covering both the "interrupting initial animation" and "interaction after initial animation completes" scenarios.

Also applies to: 1124-1162

test/cartesian/Bar.spec.tsx (4)

73-114: Horizontal bar layout expectations correctly rounded.

The bar dimension and position values (e.g., 413.3333, 81.6667, 331.6667, 163.3333) now use consistent 4-decimal precision, matching the Rectangle component's rounding behavior.


178-219: Vertical bar layout expectations correctly rounded.

The width values (e.g., 71.6667, 143.3333, 286.6667, 358.3333) for vertical bars show proper rounding, maintaining visual accuracy while ensuring cross-Node-version consistency.


1165-1182: Zero-value bar handling shows appropriate precision.

The small bar heights (e.g., 0.046 for near-zero values) demonstrate that the rounding doesn't eliminate visually meaningful precision for edge cases.


1444-1463: Stacked bar and tooltip interaction tests correctly updated.

The stacked bar position expectations maintain the 4-decimal precision pattern, ensuring tooltip interactions work correctly with the rounded coordinates.

Also applies to: 1496-1521, 1536-1555, 1750-1759

test/chart/PieChart.spec.tsx (4)

41-41: Single sector path correctly rounded.

The arc coordinates in the path data (285,205.0014) show proper 4-decimal precision for a full-circle sector.


67-72: Angle values normalized correctly.

The angle expectations now use canonical representations:

  • startAngle: 0 instead of -0 (line 68)
  • endAngle: 0 instead of 360 (line 71) - mathematically equivalent for a full rotation

This aligns with the round() utility's -0 to 0 normalization mentioned in the AI summary.


91-98: Sector arc coordinates properly rounded.

All sector path data now uses 4-decimal precision for coordinates (e.g., 202.3541,125.0438, 129.4422,178.7128), ensuring consistent rendering across different Node.js versions.


218-225: Cell-based sector rendering expectations correctly updated.

The path data for sectors rendered with explicit <Cell> components shows the same 4-decimal rounding, confirming the rounding is applied consistently regardless of how sectors are configured.

test/util/round.spec.ts (1)

4-57: Round / roundTemplateLiteral test matrix looks solid and matches util semantics

The test suite exercises default/custom precision, negative numbers and -0, small/large values, and typical SVG path/template use cases, including string passthrough and spacing. This is in line with the coverage expectations for new utilities and should give high confidence in the behavior.

Based on learnings, this looks consistent with the “aim for 100% coverage” goal for new test code.

Also applies to: 60-112

test/polar/Pie.animation.spec.tsx (3)

22-26: Updated final sector paths and static angle expectations align with 4‑decimal rounding

The finalSectorPaths and the non‑animated expectPieSectorAngles expectations now use coordinates/angles rounded to 4 decimal places and remain internally consistent (paths close correctly, angles describe a full circle with the last sector wrapping via endAngle: 0). This matches the new rounding behavior used across the shapes.

Also applies to: 208-216


272-303: Animated path/angle expectations for the simple props case look consistent with new rounding

The intermediate d attributes and angle arrays in should render sectors with animation and should render sectors with animated angles are updated to 4‑decimal values, with each step showing smooth progression and sectors that still partition the circle correctly. No logic changes beyond the expected numeric normalization.

Also applies to: 306-333


363-440: Angle expectations for dataKey/data array/visibility interactions correctly reflect rounded interpolation

Across the interaction tests (changing dataKey, changing data array, forcing re‑animation via key, and hide/show), the updated angle sequences now:

  • Use 4‑decimal precision.
  • Maintain sector continuity (startAngle of each sector equals the previous sector’s endAngle or the wrapped equivalent).
  • Preserve the expected qualitative behavior (growth from a fixed start for the first sector, rearrangements, and wraparound with endAngle: 0 for a full circle).

These updates look mechanically consistent with the new rounding behavior and the helper used in expectPieSectors.

Also applies to: 487-510, 538-607, 644-680

Comment thread test/util/round.spec.ts
Comment on lines +47 to +50
// eslint-disable-next-line no-loss-of-precision
expect(round(123456789.123456789, 2)).toBe(123456789.12);
expect(round(999999.999999, 4)).toBe(1000000);
});

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.

⚠️ Potential issue | 🟠 Major

Address precision‑loss lint on large numeric literal

Static analysis flags the 123456789.123456789 literal for precision loss, even though it’s acceptable in this test context. To keep npm run lint / Biome happy, either construct the value without a high‑precision literal or explicitly ignore this rule.

One minimal option is to add a Biome ignore alongside the existing ESLint suppression:

-  it('should handle very large numbers', () => {
-    // eslint-disable-next-line no-loss-of-precision
-    expect(round(123456789.123456789, 2)).toBe(123456789.12);
+  it('should handle very large numbers', () => {
+    // eslint-disable-next-line no-loss-of-precision
+    // biome-ignore lint/correctness/noPrecisionLoss: high-precision literal is intentional for this rounding test
+    expect(round(123456789.123456789, 2)).toBe(123456789.12);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// eslint-disable-next-line no-loss-of-precision
expect(round(123456789.123456789, 2)).toBe(123456789.12);
expect(round(999999.999999, 4)).toBe(1000000);
});
it('should handle very large numbers', () => {
// eslint-disable-next-line no-loss-of-precision
// biome-ignore lint/correctness/noPrecisionLoss: high-precision literal is intentional for this rounding test
expect(round(123456789.123456789, 2)).toBe(123456789.12);
expect(round(999999.999999, 4)).toBe(1000000);
});
🧰 Tools
🪛 Biome (2.1.2)

[error] 48-48: This number literal will lose precision at runtime.

The value at runtime will be 123456789.12345679

(lint/correctness/noPrecisionLoss)

🤖 Prompt for AI Agents
In test/util/round.spec.ts around lines 47 to 50, the numeric literal triggers
Biome's no-loss-of-precision lint rule; add a Biome ignore directive for that
rule alongside the existing ESLint suppression so the test keeps the
high-precision literal but linting passes (place the biome-ignore
no-loss-of-precision directive on the line before the numeric literal, next to
the existing eslint-disable-next-line comment).

@codecov

codecov Bot commented Nov 29, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.03%. Comparing base (d3ccaac) to head (cb1b631).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/shape/Sector.tsx 75.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6707   +/-   ##
=======================================
  Coverage   94.02%   94.03%           
=======================================
  Files         499      500    +1     
  Lines       42625    42657   +32     
  Branches     4892     4901    +9     
=======================================
+ Hits        40079    40111   +32     
  Misses       2541     2541           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codecov

codecov Bot commented Nov 29, 2025

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 8.26kB (0.31%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
recharts/bundle-cjs 1.15MB 4.2kB (0.37%) ⬆️
recharts/bundle-es6 995.73kB 3.76kB (0.38%) ⬆️
recharts/bundle-umd 519.73kB 295 bytes (0.06%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: recharts/bundle-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
shape/Rectangle.js 1.28kB 11.94kB 12.03% ⚠️
shape/Sector.js 578 bytes 9.2kB 6.71% ⚠️
shape/Trapezoid.js 734 bytes 7.85kB 10.31% ⚠️
util/DataUtils.js 52 bytes 5.83kB 0.9%
shape/Polygon.js 296 bytes 5.33kB 5.88% ⚠️
util/round.js (New) 1.26kB 1.26kB 100.0% 🚀
view changes for bundle: recharts/bundle-umd

Assets Changed:

Asset Name Size Change Total Size Change (%)
Recharts.js 295 bytes 519.73kB 0.06%
view changes for bundle: recharts/bundle-es6

Assets Changed:

Asset Name Size Change Total Size Change (%)
shape/Rectangle.js 1.11kB 10.66kB 11.65% ⚠️
shape/Sector.js 509 bytes 8.06kB 6.74% ⚠️
shape/Trapezoid.js 689 bytes 6.67kB 11.51% ⚠️
util/DataUtils.js 40 bytes 4.97kB 0.81%
shape/Polygon.js 299 bytes 4.41kB 7.27% ⚠️
util/round.js (New) 1.11kB 1.11kB 100.0% 🚀

@ckifer
ckifer merged commit 7da2c72 into main Nov 30, 2025
27 of 29 checks passed
@ckifer
ckifer deleted the round branch November 30, 2025 06:48
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