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

Tooltip link in Flowchart docs not working #682

Closed
simondorfman opened this issue Jul 7, 2018 · 10 comments
Closed

Tooltip link in Flowchart docs not working #682

simondorfman opened this issue Jul 7, 2018 · 10 comments
Labels
Type: New Shape Request for new shape

Comments

@simondorfman
Copy link

Given I'm on this page:
https://mermaidjs.github.io/flowchart.html#interaction
...and I've scrolled down to the Interaction section,
When I click on the "A" box in the example diagram,
Then I expect to see some sort of tooltip text appear, but I don't see any.

Looks like something isn't working to me. Or perhaps more javascript code is required to make some tooltip text appear? Or maybe it used to work and was accidentally broken is a prior release?

Thanks for any help.

Screenshot:
tooltip

@larryq
Copy link

larryq commented Jul 16, 2018

I'm having the same issue. The message I see in my console is:

Uncaught TypeError: window[e] is not a function
at SVGGElement. (lodash.js:2873)
at SVGGElement. (index.js:355)

That's happened on several different flowcharts I've tried. Here's an example of one that demonstrates the problem:
https://bit.ly/2JqlVep

@tarnelope
Copy link

tarnelope commented Jul 23, 2018

So currently, the tooltip is displaying but at the very bottom of the page even if it's not within the window size. Additionally, one can define the callback function on the page where the graph is displaying for more custom behavior on click. You can name the function whatever you want.

   click A functionName "Text that currently doesn't do anything"

   # Somewhere in the scripts of your page
   var functionName = function(node_id) {
       # what ever you want here
       alert('For example you can display an alert!');
   }

This doesn't seem ideal so I'll dig into it and see if the current behavior is the result of a bug and if not, I'll see what I can do to make the callback feature more intuitive.

UPDATE: Ok, it seems maybe this is due to not importingflowchart.scss, where styling for div.mermaidTooltip is defined.

@larryq
Copy link

larryq commented Jul 27, 2018

Thanks @tarnelope, it'd be a nice to have for sure if the tooltips were working again.

@tarnelope
Copy link

@larryq Yea! For now, they seem to work but require additional styling steps which I documented here: mermaidjs/mermaid-gitbook#25

@ShiruJan
Copy link

ShiruJan commented Feb 4, 2019

i download the package from npm, but i have the same error.+Uncaught TypeError: window[e] is not a function
at SVGGElement. (lodash.js:2873)
at SVGGElement. (index.js:355)

@RoyiAvital
Copy link

RoyiAvital commented Apr 7, 2019

Is there a way to have ToolTip when mouse is hovering without any action when clicking?

Update

Just do:

click idA unDefinedCallback "Any Tooltip Text"

If there is no defined callback only a Tooltip will be shown.

@nomorechickennuggets
Copy link

I've found that using the unminified version located here results in expected tooltips and clicking behavior.

@GDFaber
Copy link
Member

GDFaber commented Aug 2, 2019

Possibly related to #901?

@stale
Copy link

stale bot commented Oct 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you are still interested in this issue and it is still relevant you can comment to revive it.

@stale stale bot added the Type: New Shape Request for new shape label Oct 1, 2019
@stale
Copy link

stale bot commented Oct 15, 2019

This issue has been been automatically closed due to a lack of activity. This is done to maintain a clean list of issues that the community is interested in developing.

@stale stale bot closed this as completed Oct 15, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: New Shape Request for new shape
Projects
None yet
Development

No branches or pull requests

7 participants