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

sandbox for the Tooltip example on website is not working #314

Open
scho3034 opened this issue Jan 10, 2023 · 7 comments
Open

sandbox for the Tooltip example on website is not working #314

scho3034 opened this issue Jan 10, 2023 · 7 comments

Comments

@scho3034
Copy link

Example sandbox of tooltip is not working.
https://www.react-simple-maps.io/examples/map-chart-with-tooltip/

@santimone
Copy link

change on sandbox de import ReactTooltip for import { Tooltip as ReactTooltip } from 'react-tooltip';

@bnbon
Copy link

bnbon commented Jan 15, 2023

Even then, I think v5 react-tooltip works quite differently so would need a new example beyond the above change.

@gabrieljablonski
Copy link

The easy fix is to update the CodeSandbox to use [email protected], instead of react-tooltip@latest.

The other alternative is to update the example to cover the new version (v5). If anyone decides to take that on, and changes to react-tooltip would make it easier somehow, I'd be willing to help as one of the maintainers of react-tooltip.

@scho3034
Copy link
Author

scho3034 commented Jan 17, 2023

@gabrieljablonski There is one other issue with using react-tooltip v5. The tooltip does not display on top of the marker. Instead it displays below in the div, but using v4 or below it displays properly on top of the marker.

@gabrieljablonski
Copy link

gabrieljablonski commented Jan 17, 2023

@gabrieljablonski There is one other issue with using react-tooltip v5. The tooltip does not display on top of the marker. Instead it displays below in the div, but using v4 or below it displays properly on top of the marker.

That sounds like something that would happen if you're not doing import "react-tooltip/dist/react-tooltip.css";.

If that's not the case, please open an issue over there with sample code, preferably a CodeSandbox, demonstrating the problem.

@gabrieljablonski
Copy link

@scho3034 you should probably keep this issue open, since the example on the website still needs to be fixed.

@scho3034 scho3034 reopened this Jan 17, 2023
@Tokelin
Copy link

Tokelin commented Jan 27, 2023

@gabrieljablonski even adding the CSS import, the content is still displayed below the map. To get the desired effect the float option needs to be added to the Tooltip, that way it's always displayed below the mouse.

Here is a codesandbox with a working tooltip.

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

No branches or pull requests

5 participants