Tooltip on the line

Hi, I am drawing the line to indicate the average after sorting.
How can I tooltip the line or show the average number on hovering?
Or alternative way… Thanks

https://snippet.webix.com/96j4vieh

Hello @laicp,

How can I tooltip the line or show the average number on hovering?

You can’t add a tooltip to the line specifically, as it is not an HTML element, but instead simply a border of a certain cell specified via CSS. This is important, since you are only able to attach tooltips directly to the HTML nodes (meaning pseudo-elements won’t work either).

It is, however, pretty straightforward when it comes to adding a tooltip to the specific nodes. For example, in your snippet you are adding a CSS class to certain nodes. Once you know the position of these nodes, you can create a custom tooltip function and perform a check for the highlighted nodes.

As an example: https://snippet.webix.com/49h2wwa4.

Hi @Dzmitry … Thanks. The solution is pretty workable.