Skip to content

[XYChart] SSR does not work on XYChart #1478

@nagiek

Description

@nagiek

Hello,

I wanted to report that a small logic error stops SSR from working for XYchart.

In useScales line 43, x/yScale will be returned as undefined if there are no values in the dataRegistry. This stops render of all children of XYChart (Axis, Grid, etc.).

In withRegisteredData line 56, the Series component will not be rendered if there is no x/yScale. This is done on line 48 in a useEffect block. I would propose moving the initial registerData call out of useEffect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions