Your search did not match any results.

Tooltip and Legend

Documentation

This demo shows how to enable and customize tooltips in the the BarGauge component. A tooltip is a small pop-up rectangle that displays the value of the bar that is currently hovered over. To enable the tooltips, the enabled property is set to true. The text displayed by the tooltips is customized using the customizeText property.

Backend API
@(Html.DevExtreme().BarGauge() .ID("gauge") .StartValue(0) .EndValue(200) .Values(new[] { 121.4, 135.4, 115.9, 141.1, 127.5 }) .Label(l => l.Visible(false)) .Tooltip(t => t .Enabled(true) .CustomizeTooltip("customizeTooltip") ) .Export(e => e.Enabled(true)) .Title(t => t .Text("Average Speed by Racer") .Font(f => f.Size(28)) ) .Legend(l => l .Visible(true) .VerticalAlignment(VerticalEdge.Bottom) .HorizontalAlignment(HorizontalAlignment.Center) .CustomizeText("customizeText") ) ) <script> function getText(item, text) { return "Racer " + (item.index + 1) + " - " + text + " km/h"; } function customizeTooltip(arg) { return { text: getText(arg, arg.valueText) }; } function customizeText(arg) { return getText(arg.item, arg.text); } </script>
using DevExtreme.NETCore.Demos.Models.SampleData; using Microsoft.AspNetCore.Mvc; namespace DevExtreme.NETCore.Demos.Controllers { public class GaugesController : Controller { public ActionResult Tooltip() { return View(); } } }
#gauge { height: 440px; width: 100%; }