Telerik Forums
Kendo UI for Angular Forum
0 answers
79 views

I want to apply tooltip to legend

If possible tooltip content I can write

please....... help me

 

park
Top achievements
Rank 1
 asked on 15 Apr 2022
0 answers
286 views

Hi. 

I'm using donut chart, and I would like to know if there is any way to add a tooltip with the full name of the legend when hovering over it. I needed it because there is a scenario where I add ellipsis when the name is too big. As in the image below:   

I'm adding ellipsis changing the legend content:

public legendItemContent = (elements: any): string => {
    if (elements.text.length > 30) {
        elements.text = elements.text.substring(0, 30);

        return elements.text.concat('...');
    }

    return elements.text;
};

I tried several solutions but none were successful. I found out this answer, which was the closest approach, but it's not exactly what I wanted.

If it helps in any way, I'm using this stackblitz project to perform my tests.

Thank you beforehand.


Yago
Top achievements
Rank 1
 updated question on 20 Jul 2021
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?