Skip to content

SVG path data has inconsistent floating point precision #3067

@wildlyinaccurate

Description

@wildlyinaccurate

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Victory version

37.3.6

Code Sandbox link

No response

Bug report

I am using Victory within React Router v7, and I've been getting hydration issues due to different floating point precision on the server and client. For example:


+d="M60,240L87.5,240L115,240L142.5,240L170,240L197.5,240L225,74.4L252.5,67.2L280,67.2L307.5..."
-d="M60,240L87.5,240L115,240L142.5,240L170,240L197.5,240L225,74.4L252.50000000000003,67.2L2..."

Steps to reproduce

Expected behavior

Actual behavior

Environment

- Device: Desktop
- OS: Mac OS
- Node: 24
- npm: 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Bug 🐛Oh no! A bug or unintentional behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions