# Tooltip

The Telerik UI Chart enables you to display details about the data point over which the mouse is currently hovering.

The border of this tooltip matches the color of the series.

![UI for ASP.NET MVC The Chart tooltip](https://www.telerik.com/aspnet-mvc/documentation/assets/b7efb44a65775301c65fa0e33ab29dd4/chart-tooltip.png)

## Getting Started

By default, the tooltip of the Chart is not visible. You can enable it by setting the visible property of the tooltip object to `true`.

```Razor HtmlHelper
    @(Html.Kendo().Chart()
        .Name("chart")
        .Series(s => s
            .Bar(new double[] { 67.96, 68.93, 75, 74, 78 })
        )
        .CategoryAxis(c => c
            .Categories(new string[] { "2005", "2006", "2007", "2008", "2009" })
        )
        .Tooltip(t => t.Visible(true))
    )
```

The tooltip can also be configured per series.

```Razor HtmlHelper
    .Series(s => s
        .Bar(new double[] { 67.96, 68.93, 75, 74, 78 })
        .Tooltip(t=>t.Visible(true))
    )
```

## Using Format Values

To format the point value, use the `Format` property. In the following example, `N0` indicates that the value will be rounded to a whole number and will have a thousands separator.

> Points in categorical (XY) Charts have two values—`{0}` and `{1}` (X and Y).

```Razor HtmlHelper
    .Tooltip(t => t
        .Visible(true)
        .Format("Value: {0:N0}")
    )
```

## Using Templates

To provide better flexibility, define the content of a tooltip through a template.

The template provides access to all information associated with the point:

* `value`—The point value. Value dimensions are available as properties, for example, `value.x` and `value.y`.
* `category`—The category name.
* `series`—The data series.
* (When binding to a data source) `dataItem`—The original data item.

```Razor HtmlHelper
    .Tooltip(t => t
        .Visible(true)
        .Template("Value: #= value # ; Category: #= category #")
    )
```

You can also use an external template by specifying [`TemplateId`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/chartaxiscrosshairtooltipbuilder#templatesystemstring).

```Razor HtmlHelper
    .Tooltip(t => t
        .Visible(true)
        .TemplateId("tooltipTemplate")
    )
```

```JS Template
    <script id="tooltipTemplate" type="text/x-kendo-template">
        Value: #= value # ; Category: #= category #
    </script>
```

## See Also

* [Using the API of the Chart HtmlHelper for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/chart-api/index)
* [Basic Usage of the Area Chart for ASP.NET MVC (Demos)](https://demos.telerik.com/aspnet-mvc/area-charts/index)
* [Server-Side API of the Chart for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/api/chart)
