Skip to content

[Tooltip] Invalid defaultProps for viewBox #3548

Description

@ckifer

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Currently the recharts tooltip has some incorrect viewBox default props set https://github.com/recharts/recharts/blob/master/src/component/Tooltip.tsx#L103

  viewBox: { x1: 0, x2: 0, y1: 0, y2: 0 },

current viewBox properties are x, y, height, width

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: http://jsfiddle.net/ndLhnegs/).

https://github.com/recharts/recharts/blob/master/src/component/Tooltip.tsx#L103

What is the expected behavior?

Use the correct props + test that the correct props don't break anything

Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?

latest version, code issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    TooltipIssues that deal with the Tooltip content, its behaviour, and bugs.bugGeneral bug label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions