We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

What is the difference between tooltip format and tooltip template?

Platform: ASP.NET Web Forms |
Control: Chart

When you move the mouse over a particular point, tooltip displays the values of that point. By default its display format looks like “x value :  y value (eg:  2000: 20)”.

Tooltip format

You can customize the values displayed in tooltip using format property. The online sample using tooltip format is available in the following link.


Tooltip template

Tooltip template refers to using HTML elements like image, tables in tooltip through template property of tooltip. Since HTML elements such as div, image, table, etc., are used, you can style the tooltip template using CSS and it appears more attractive than default tooltip. The online sample for tooltip template is available in the following link.


Difference between tooltip format and template

In general, tooltip format is used to format the values displayed in tooltip whereas tooltip template is used to customize the appearance of tooltip.

In the following code example, the first series is rendered with tooltip template, next with specified tooltip format and the last series is rendered with default tooltip.


<%--Div element used as template for tooltip--%>
    <div id="Tooltip" style="display: none">Year : #point.x# <br> Percent : #point.y# %</div>
    <ej:Chart ID="container" runat="server">
           <ej:Series Name="India" Type="Spline">
               <%--ID of a html element should be used in template property--%>
               <Tooltip Visible="true" Template="Tooltip"></Tooltip>               
            <ej:Series Name="India" Type="Spline">
               <Tooltip Visible="true" Format="#point.x# <br/> #point.y#"></Tooltip>               
            <ej:Series Name="India" Type="Spline">
               <Tooltip Visible="true"></Tooltip>               

The output of the above code example is as follows.

The difference between tooltip format and tooltip template

Figure 1: Chart with Tooltip template

2X faster development

The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile