-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Describe/explain the bug
After update nivo to latest version 0.99.0 there is no way to override axis format() function with custom output.
This code won't work anymore on @nnivo/line chart:
format: (d) => {
var m = d.toLocaleString("en-GB", { month: "short" });
return (
<>
<tspan fontSize={19}>{m}</tspan>
<tspan fontSize={19} y={23} x={0}>
{d.getFullYear()}
</tspan>
</>
);
},because the output of this function is casted to a string
This wasn't the case in version 0.79.1.
Unfortunately, this breaks my application. Is there a workaround, or can I restore the previous behavior of this function, i.e., not force conversion to string?
Bug Example
This is how it used to work:
https://codesandbox.io/p/sandbox/distracted-cherry-wxm5xx
There is issue in newer version:
https://codesandbox.io/p/devbox/epic-babycat-hqvf72
Issue is there due this line:
| {`${value}`} |
Regards,
Paweł
Metadata
Metadata
Assignees
Labels
No labels