-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
Could this be made to work with SVG embedded in the document? #17
Comments
I did a quick test with SVG. Seems not working. but may work with LESS/SASS? Hint test: http://jsfiddle.net/shavindra/exULa/66/embedded/result/ Original ref: http://rod.vagg.org/2012/05/data-uri-svg/ |
@langalex Do you want to show some SVG inside the tooltip as the above fiddle tries to do? |
Sorry, no. I was talking about adding tooltips to SVG elements in the DOM, i.e. I have an SVG chart created with d3.js and when I hover over it I want to display some numbers. |
has anyone been able to get hint.css working inside an embedded SVG? I'm having the exact same issue as @langalex: I'm using d3 and hints don't appear. The suggestions at @cvrebert's link don't work, either. Inside Chrome Devtools, I can see that the styles are applied if I use a |
Drop your svg inside of a div. Tip the div.
|
Thanks for the idea. It works but is too limited because the tip always appears outside the SVG canvas. I'm trying to do an SVG map with hints for each state/province and hints that appear far away from the Before @taystack replied I made this minimal test case: http://jsfiddle.net/phette23/TkpS2/ |
Don't know how your mapped out but if you want a specific hint you need to
|
Yeah, at that point I should just go with another solution. There are JavaScript-based d3 tooltip plugins, I just wanted to use hint.css. Trying it out, I had no idea svg elements don't support |
Honestly, you could knock it out with 3 lines of JavaScript, one line of
|
So here is a link to some code you might find useful. It is pretty much a On Sun, Feb 2, 2014 at 2:47 PM, T Stack [email protected] wrote:
|
Yup, I basically mimicked your example but with D3. D3 replicates a lot of jQuery's (event listeners, selection, chaining) so it's not necessary to use both. If anyone comes across this & is curious, here's the approach I took. |
No description provided.
The text was updated successfully, but these errors were encountered: