datamaps icon indicating copy to clipboard operation
datamaps copied to clipboard

How to Trigger PopUp

Open FreelanceWebNinja opened this issue 10 years ago • 4 comments

Is there a way to trigger the PopUp?

For instance, an external button triggers the popup?

FreelanceWebNinja avatar Jul 20 '16 23:07 FreelanceWebNinja

@markmarkoh This is exact functionality I am looking for.

@FreelanceWebNinja Did you end up figuring this out?

mikecabana avatar Dec 22 '17 18:12 mikecabana

@mikecabana i created a custom function that essentially toggles the pop up and manually positions the element.

FreelanceWebNinja avatar Dec 22 '17 19:12 FreelanceWebNinja

@FreelanceWebNinja Would you be able to provide a little more detail? Did you use your own tooltips or the ones generated by datamaps.

If you generated your own, did you use the x y values of the arcs for positioning?

mikecabana avatar Dec 22 '17 19:12 mikecabana

NP @mikecabana , I've actually done both. With the generated tooltips, I targeted the arc/bubble and used getboundingclientrect() to get the coords.

FreelanceWebNinja avatar Dec 22 '17 19:12 FreelanceWebNinja