-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Giving Heading to Legends. #2904
Comments
You can render a custom Legend using the content prop in the Legend component. You can pass it a function (or a component, read the docs for more info) which will render the Legend. This is an example:
You can find the full chart here: https://codesandbox.io/s/customized-legend-event-forked-b32o5t |
This issue has an answer, but providing the ability to give a legend header may be a nice idea in general. Labeling a feature request for now to come back to eventually. |
@ckifer Is there a way to access the default legend content function from within my custom legend content function? I want to add my header to the legend but I want the rest of the content to match the default legend. Something like:
|
@bhatt40 yeah,
|
@ckifer Got it. Thanks. |
I want to add heading to the legends. Like I want to add the heading Score.
The text was updated successfully, but these errors were encountered: