Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.95 KB

File metadata and controls

61 lines (40 loc) · 1.95 KB
layout post
title Tooltip
description Learn how to add Tooltip to Sunburstchart .
platform Angular
control Sunburst Chart
documentation ug

How to add Tooltip to SunburstChart?

ToolTip allows you to display any information over a sunburst segment. It appears when mouse hovered over or touch any chart segment. By default, it displays the corresponding segment category name and its value

{% highlight js %}

<ej-sunburstchart id="sunburst" [tooltip.visible]="true" >

{% endhighlight %}

Tooltip Template

HTML elements can be displayed in the tooltip by using the tooltip.template property of the tooltip. The template property takes the value of the id attribute of the HTML element. You can use the #point.x# and #point.y# as place holders in the HTML element to display the x and y values of the corresponding point.

{% highlight js %}

  Category: #point.x#
  Value:#point.y#

<ej-sunburstchart id="sunburst" [tooltip.visible]="true" tooltip.template="Tooltip" >

{% endhighlight %}

Customize the appearance of tooltip

The fill and border options are used to customize the background color and border of the tooltip respectively. The font option in the tooltip is used to customize the font of the tooltip text.

{% highlight js %}

<ej-sunburstchart id="sunburst" [tooltip.border]="{color:'black',width:2}" [tooltip.visible]="true" [tooltip.font]="{fontFamily:'Arial',fontStyle:'Italic',size:'10px'}">

{% endhighlight %}