Difference between tooltip format and tooltip in ASP.NET MVC 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.
https://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.
https://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.
Figure 1: Chart with Tooltip template
Conclusion
I hope you enjoyed how to rotate axis labels.
You can refer to our ASP.NET MVC Charts feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our ASP.NET MVC Charts example to understand how to create and manipulate data.
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 forums, Direct-Trac, or feedback portal. We are always happy to assist you!