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

update Tooltip docs #47

Closed
wants to merge 20 commits into from
Closed

update Tooltip docs #47

wants to merge 20 commits into from

Conversation

richbai90
Copy link

I've been having a lengthy discussion with the definitely typed team about adding these attributes. They understandably are hesitant to add undocumented types. Since the underlying code base makes use of these types, and they are useful when creating a custom tooltip, they should be documented.

See the PR on definitely typed here
I also opened an issue on the recharts main repo here

bcongdon and others added 20 commits July 11, 2017 08:04
…m-LineChart

Add HighlightAndZoomLineChart Example in LineChart
Add missing startAngle endAngle prop in RadialBarChart
Add documentation for the arbirary domain changes
…der-order

feat: adds documentation for reverseGroupOrder, fix #873
…w-wording

Clarify wording of allowDataOverflow description
@naw
Copy link

naw commented Feb 14, 2018

What's confusing to me is that the docs mix together two things:

  1. The props you give to <Tooltip /> yourself within a chart "definition" in order to configure the tooltip.
  2. The props that recharts gives to the underlying content renderer for the tooltip, whether it be the default one or a custom one.

Granted, there is a lot of overlap between these, but not entirely, because recharts calculates a lot of stuff for you and you can't actually directly configure it for the tooltip (color, for example).

I think this PR is good in the sense that it adds some of the attributes that recharts gives to the custom tooltip component within the payload prop, but even with this PR, overall it's still difficult to know what props a custom tooltip actually gets without actually diving into the source code.

@naw
Copy link

naw commented Feb 14, 2018

In other words, the docs are not distinguishing between props you give to recharts vs. props you get from recharts.

@richbai90
Copy link
Author

You make a good point. If there is any guidance on how these items are calculated and when they can be expected to be available I'd happily write it up in more detail. My knowledge thus far has come from examining the code at length until I could figure out what was going on. That is certainly error prone at best.

@xile611
Copy link
Member

xile611 commented Jul 5, 2018

Thanks for all your suggestion! In my opinion, show all the underlying props of Tooltip is confused Which may be not stable. So I don't list these props!

@xile611 xile611 closed this Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants