Skip to content
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

Documentation on Customized component #3102

Closed
1 task done
talyh opened this issue Dec 16, 2022 · 5 comments
Closed
1 task done

Documentation on Customized component #3102

talyh opened this issue Dec 16, 2022 · 5 comments
Labels
docs needed Issues that require documentation good first issue Issues with this label are great for first time contributors P0 Critical priority issues

Comments

@talyh
Copy link

talyh commented Dec 16, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

https://recharts.org/en-US/api/Customized has very limited (and to some extent, conflicting) information about adding custom components to charts.

The copy indicates Cell can be wrapped by Pie, Bar, or RadialBar (potentially leftover from using https://recharts.org/en-US/api/Cell as basis for this page)
The parent component section indicates pretty much all chart types accept this as a child.

And the actual API just indicates components with no clear guidance on how to actually incorporate this into a chart (i.e how it can leverage chart data, how to position it in relationship to other chart elements, etc).

It'd be great if this page could be revised AND if something could be added to https://recharts.org/en-US/examples to display <Customized> being used

What does the proposed API look like?

Just documentation requested, no code changes.

@ckifer ckifer added docs needed Issues that require documentation P0 Critical priority issues labels Dec 16, 2022
@ckifer
Copy link
Member

ckifer commented Dec 16, 2022

Hey @talyh

Sorry for the lacking documentation, recharts hasn't had anyone actively working on it in a while. https://github.com/recharts/recharts.org is the docs site. Will open an issue over there linking this. Feel free to make a PR if you want to contribute!

@talyh
Copy link
Author

talyh commented Dec 16, 2022

Thanks for the super quick answer @ckifer !

I actually couldn't get <Customized/> to work, so I don't feel very confident in opening a PR to update the documentation. I'm half-suspicious there's actually a bug preventing it to render correctly, but it may be just me not knowing how to use it (hence the ask for documentation and examples 😄 )

I'll try to dig through the code to at least try and isolate if there's a bug or not (and, if there is, open a separate report for it)

@ckifer
Copy link
Member

ckifer commented Dec 16, 2022

Sweet sounds good. I opened the issue above in the docs repo - if anything I'll make the change for the misleading Cell reference.

@ckifer ckifer added the good first issue Issues with this label are great for first time contributors label Dec 29, 2022
@ckifer
Copy link
Member

ckifer commented Jan 27, 2023

@talyh

https://recharts.org/en-US/examples/CustomizedContent

Hopefully this helps! Basically you should be able to render any SVG content but have access (in a component or a function) to the properties that are computed/used to compute chart positions and more.

Super basic example to start, we'll add more in the future I'm sure.

@ckifer
Copy link
Member

ckifer commented Jan 27, 2023

Going to close this for now, please comment back if this doesn't help!

@ckifer ckifer closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs needed Issues that require documentation good first issue Issues with this label are great for first time contributors P0 Critical priority issues
Projects
None yet
Development

No branches or pull requests

2 participants