This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Tooltip
#1
Hi, is possible to add a tooltip to a link object....???
Reply
#2
Please, not only for links but for normal objects too. It would be a great improvement for "user" visualisations.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#3
No solution...???
Reply
#4
(13.02.2017, 15:16)cekca Wrote: No solution...???

If this is only for a few points you can prepare widgets and open appropriate by clicking to the value.
Reply
#5
Hi,

What you could do is use the normal text objects and give it a custom class and css to hide it by default. (and optional a background with rounded corners by css)

Then add a custom css class to your object and some custom javascript that detects a hover on the object and toggle the class on the (or group of) text object(s). 

This way you can have a tooltip effect.

I don't see any other easier way then this..

BR,

Erwin
Reply
#6
Add two classes to the visualization element that you want to have a tooltip: tooltip tooltip-1
Common tooltip class provides the tooltip element itself, while second class (tooltip-1) specifies the tooltip text

Custom CSS, adjust styles and text as needed:
Code:
.usermode .tooltip:before {
  display: none;
  position: absolute;
  top: -30px;
  height: 20px;
  line-height: 20px;
  left: 0;
  background-color: #eee;
  padding: 2px 6px;
  border-radius: 3px;
}
.usermode .tooltip:hover:before {
    display: block;
}
.usermode .tooltip-1:before {
  content: "My custom tooltip";
}
Reply
#7
(14.02.2017, 07:45)admin Wrote: Add two classes to the visualization element that you want to have a tooltip: tooltip tooltip-1
Common tooltip class provides the tooltip element itself, while second class (tooltip-1) specifies the tooltip text

Custom CSS, adjust styles and text as needed:
Code:
.usermode .tooltip:before {
  display: none;
  position: absolute;
  top: -30px;
  height: 20px;
  line-height: 20px;
  left: 0;
  background-color: #eee;
  padding: 2px 6px;
  border-radius: 3px;
}
.usermode .tooltip:hover:before {
    display: block;
}
.usermode .tooltip-1:before {
  content: "My custom tooltip";
}

Hi Admin, I have tryed this solution, but it doesn't work Sad
Can you explain it better?
Thanks
Reply
#8
It works, only you will see it in the final visu not in editor.
------------------------------
Ctrl+F5
Reply
#9
I don't see it even in the final visu..
Reply
#10
As the instructions says add the two classes to Additional class of visu element tooltip tooltip-1 and then paste the code to additional css. Have you done all this?
------------------------------
Ctrl+F5
Reply
#11
yes I have done it
Reply
#12
Send me your backup to PM, use wetransfer.com or similar
------------------------------
Ctrl+F5
Reply
#13
ok I found the problem.. if my element is "read-only" the tooltip doesn't work.. I need it to work even if my element is "read-only"
Reply
#14
hm. I don't think it will work as when element is read only there is no 'hover' on this element.

As a work around, you can add invisible image and place it under your object. Attach tooltip to the image and it will work.
------------------------------
Ctrl+F5
Reply
#15
I have 400 sensors that are read only, it is not a great work around Sad
Reply
#16
I have found a solution more elegant and simple for using tooltip with elements that are "read-only".




You have to add only those lines:



Code:
.tooltip > div > img {
  pointer-events: auto;
}
Reply
#17
Is there a way to change the text via javascript?
because this code doesn't work
Code:
$(".tooltip").mouseover(function(){
    $(".usermode .tooltip-1:before").css("content", "test");
});

someone can help me?

Thanks,
Mirco
Reply
#18
See this: https://stackoverflow.com/questions/1049...5#42000085
Reply
#19
(13.02.2017, 23:34)Erwin van der Zwart Wrote: Hi,

I have try but not found where put the class for object , is possible have one example ?
I have see where set class in the object baut non wher insert the class code for tooltip .

thank's
Reply
#20
Hi,

There is a css section on the graphics tab.

BR,

Erwin
Reply


Forum Jump: