Your search did not match any results.
Bar Gauge

Labels Customization

Documentation

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

@(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%; }