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

No popupTemplate on arcConfig #13

Open
dheiahmari opened this issue Jun 21, 2017 · 2 comments
Open

No popupTemplate on arcConfig #13

dheiahmari opened this issue Jun 21, 2017 · 2 comments

Comments

@dheiahmari
Copy link

dheiahmari commented Jun 21, 2017

I'm currently using react-datamaps v0.3.0 and it's perfect for what I need but then I tried arcConfig.popupTemplate but can't seem to make it work. The 'popupTemplate' function returns a plain string. I tested it on bubblesConfig and it works fine. Is this still unsupported or am I doing something wrong?

Here's my code:

<Datamap bubbles={this.state.bubbles} bubblesConfig={{ popupTemplate: bubblePopupTemplate }} arc={this.state.arcs} arcConfig={{ popupTemplate: arcPopupTemplate }} />

const bubblePopupTemplate = function(geo, data) { return 'hello'; };

const arcPopupTemplate = function(geo, data) { return 'hi'; };

Thanks in advance for your awesome work! 😄

@btmills
Copy link
Owner

btmills commented Feb 22, 2018

Apologies for the delay in looking at this 😥

The bubbles example returns the string wrapped in <div class="hoverinfo">...</div>, which I think datamaps uses to generate HTML for the box. What happens if you do that?

At some point #3 ought to make popups a lot easier.

@riteshnus
Copy link

@btmills i am using the Arc datamap. So is it possible to add the popUpTemplate in arc datamap.

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

3 participants