Skip to content

Tooltip doesn't receive typing info from createHorizontalChart #7119

Description

@MonstraG

What is the current behavior?

Typed.Tooltip has formatter with first argument being ValueType | undefined instead of whatever comes from createHorizontalChart. Same goes for other arguments of formatter, and content prop.

What is the expected behavior?

It behaves like Typed.XAxis, and others.

Please provide a demo of the problem in a sandbox

https://stackblitz.com/edit/1snuausu?file=src%2FExample.tsx

(see HOVER OVER VARIABLE TYPES HERE comment)
(this is just first Lines demo but with Typed)

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

3.8.0

it could be the case of me holding it wrong, but the recharts' typescript docs also never use Typed.Tooltip, which probably they should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions