)
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. (Last updated on: June 24, 2019).
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 MVC |
Control: Chart |
Published Date: January 19, 2015 |
Last Revised Date: July 1, 2019

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.

http://mvc.syncfusion.com/demos/web/chart/symbols

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.

http://mvc.syncfusion.com/demos/web/chart/tooltiptemplate

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.

CSHTML

<div id="Tooltip" style="display: none">Year : #point.x# <br> Percent : #point.y# %</div>
@(Html.EJ().Chart("container")
     .Series(s =>
     {
         s.Tooltip(t => t.Visible(true).Template("Tooltip")).Add();
         s.Tooltip(t => t.Visible(true).Format("#point.x# <br/> #point.y#")).Add();
         s.Tooltip(t => t.Visible(true).Template("tooltip")).Add();
     })
 )

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 MVC UI toolkit to boost your development speed.
ADD COMMENT
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
Live Chat Icon