Skip to content

Mouse Event activeLabel incorrect typing #6688

Description

@drewhoener

MouseHandlerDataParam#activeLabel is listed as string | undefined but does not conform to those types, and does not document the behavior of its content.

What is the current behavior?

I have some time series data where dataKey='timestamp'. I was fooling around with pan/zoom so I printed out the content from the onMouseDown event.

Image

activeLabel is a number, and activeIndex is a string (what appears to be the stringified version of the array index).
I don't know what I expected but this isn't it.

What is the expected behavior?

activeLabel should at least have the correct type. Ideally the docs should be updated to say what activeLabel is supposed to contain.

activeIndex docs should be updated to say that it's a stringified index? I guess? I'm not even sure why this is the behavior.

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

Recharts 3.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    docs neededIssues that require documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions