Your search did not match any results.

Labels Customization


This demo shows how to adjust the label appearance in the BarGauge component. For this purpose, the properties of the label object are used. You can specify format and precision, customize the text displayed by labels using the format, precision and customizeText properties, respectively. In addition, you can change the distance between labels and the upper gauge bar using the indent property.

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.NETCore.Demos.Models.SampleData; using Microsoft.AspNetCore.Mvc; namespace DevExtreme.NETCore.Demos.Controllers { public class GaugesController : Controller { public ActionResult LabelsCustomization() { return View(); } } }
#gauge { height: 440px; width: 100%; }