charts tooltips templating - request for a stackblitz demo to make things clearer

Hi Support! :)

I'm struggling with how to deal with templating in tooltips. 
One of the reasons i'm struggling is that i have a hard time figuring out how to deal with the templating as descibed here:
https://ej2.syncfusion.com/angular/documentation/chart/how-to/tool-tip-table/#create-a-table-in-tooltip

Please add a stackblitz example to the page so it is easier to understand how i can make this feature work in our application as well. 


Best regards

1 Reply 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team December 23, 2020 03:12 PM UTC

Hi Benjamin,

We suggest you specify the template value as string content. We have prepared sample and attached for your reference. Please check with below link.

 public tooltipTemplate: string =    "<div id='templateWrap'><table style='width:100%;border: 1px solid black;'><tr><th colspan='2'  bgcolor='#00FFFF'>Female</th></tr><tr><td bgcolor='#00FFFF'>${x}:</td><td bgcolor='#00FFFF'>${y}</td></tr></table></div>";
this.tooltip = {
      enable: true,
      template: this.tooltipTemplate
    };




Please revert us if you have any concerns.

Regards,
Durga G



Marked as answer
Loader.
Up arrow icon