Your search did not match any results.

Gauges - Labels Customization

This demo shows how to use the properties of the label object to adjust the label appearance in the BarGauge component. You can specify the format and precision and customize the text displayed by labels. You can also use the indent property to change the distance between labels and the upper gauge bar.

Backend API
@(Html.DevExtreme().BarGauge() .ID("gauge") .StartValue(0) .EndValue(100) .Values(new [] { 47.27, 65.32, 84.59, 71.86 }) .Label(l => l .Indent(30) .Format(f => f.Type(Format.FixedPoint).Precision(1)) .CustomizeText(@<text> function (arg) { return arg.valueText + " %"; } </text>) ) .Export(e => e.Enabled(true)) .Title(t => t .Text("Series' Ratings") .Font(f => f.Size(28)) ) )
using DevExtreme.MVC.Demos.Models.SampleData; using System.Collections.Generic; using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class GaugesController : Controller { public ActionResult LabelsCustomization() { return View(); } } }
#gauge { height: 440px; width: 100%; }