Skip to content

How to target axis with ReferenceLine if underlying data type is not number or string? #4439

Answered by ckifer
tomashaddad asked this question in Q&A
Discussion options

You must be logged in to vote

You have to be getting your data from somewhere and since Date isn't serializable it has to come in a different form than Date correct?

Date isn't supported right now, mostly for that reason (and legacy reasons that I wasn't around for).

So you're not doing anything wrong per se, but recharts won't behave unless you use string or number data.

Usually one would get dates as a string or a number and then format them using Date (or a library) in tickFormatter on the axis

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tomashaddad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants