Articles in this section
Category / Section

The difference between tooltip format and template in WebForms Chart

1 min read

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.

https://asp.syncfusion.com/demos/web/chart/symbols.aspx

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.

https://asp.syncfusion.com/demos/web/chart/tooltiptemplate.aspx

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.

 ASP

<%--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">
        <Series>
           <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>
            <ej:Series Name="India" Type="Spline">
               <Tooltip Visible="true" Format="#point.x# <br/> #point.y#"></Tooltip>               
           </ej:Series>
            <ej:Series Name="India" Type="Spline">
               <Tooltip Visible="true"></Tooltip>               
           </ej:Series>
        </Series>
    </ej:Chart>

The output of the above code example is as follows.

The difference between tooltip format and tooltip template

Figure 1: Chart with Tooltip template


Note:

A new version of Essential Studio for ASP.NET is available. Versions prior to the release of Essential Studio 2014, Volume 2 will now be referred to as a classic versions.The new ASP.NET suite is powered by Essential Studio for JavaScript providing client-side rendering of HTML 5-JavaScript controls, offering better performance, and better support for touch interactivity. The new version includes all the features of the old version, so migration is easy.

The Classic controls can be used in existing projects; however, if you are starting a new project, we recommend using the latest version of Essential Studio for ASP.NET. Although Syncfusion will continue to support all Classic Versions, we are happy to assist you in migrating to the newest edition.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls. If you have any queries or require clarifications, please let us know in the comments section below.

You can also contact us through our support forumsDirect-Trac, or feedback portalWe are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied