This is a migrated thread and some comments may be shown as answers.

Complex tooltips on diagram shapes?

3 Answers 169 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 06 Apr 2017, 04:33 PM

As far as I can see (http://docs.telerik.com/kendo-ui/api/javascript/drawing/tooltip-options#fields-content) I can only really provide a text string to the .drawingElement.options.tooltip (or a function that returns a text string). If the string is a uri then the tooltip actually tuns into a iFrame with whatever content you want as delivered by the uri.

What I would like to do is to be able to use a function that returns a DOM element (a div containing data laid out in a non trivial way). Can this be done? if so how? If not do I have any other choice than to use the uri and iFrame mechamism?

Also: is there any documentation anywhere that describes the properties and methods (if any) associated with the parameter that is passed to 'function' version of the tooltip content?

 

Regards

 

Alan

3 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 10 Apr 2017, 02:42 PM
Hello Alan,

The function that you assign to the tooltip content property can also return HTML. You can see in this Dojo a Diagram with tooltips colored in red, using HTML with inline styles:
http://dojo.telerik.com/@tsveti/AgERE/4


Regards,
Tsvetina
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Alan
Top achievements
Rank 1
answered on 11 Apr 2017, 07:59 AM
Thanks - that's just what I wanted - but is there anything that describes the parameter? (arg in the example)
0
Tsvetina
Telerik team
answered on 13 Apr 2017, 07:38 AM
Hello Alan,

I used this parameter just to check what was passed to the template function, but didn't use any of the arguments. They point to the hovered Shape object (arg.target) and the SVG element representing it (arg.element).


Regards,
Tsvetina
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Diagram
Asked by
Alan
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Alan
Top achievements
Rank 1
Share this question
or