Skip to content

Axis labels cannot be wrapped in a custom component #6156

@rinkstiekema

Description

@rinkstiekema

What is the current behavior?

Labels that are wrapped in a custom component do not show on the axis.

What is the expected behavior?

I'd expect to wrap any rechart component in a custom component without losing functionality. This would allow me to create a composable component with useful defaults. Right now I'll have to go with a configuration approach and coupling the custom label component to a custom axis component.

Please provide a demo of the problem in a sandbox

In this example I've got two axes. One uses the <Label /> component directly. The other wraps it in a simple react component, which won't show.

https://react-rsqcnnbw-hr8e7m2f.stackblitz.io

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement to a current APIfeature requestIssues that are feature requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions