Your search did not match any results.
Range Selector

Custom Formatting

This demo demonstrates the ability of the RangeSelector to set a custom format. The format of the slider marker is customized via the customizeText callback. The scale data is also formatted since the initial precision set in the data source is not suitable for properly displaying the data. So, a more appropriate precision is set for scale labels.
@(Html.DevExtreme().RangeSelector() .ID("range-selector") .Margin(m => m.Top(50)) .Size(s => s.Height(210)) .Scale(s => s .MinorTickInterval(0.001) .TickInterval(0.005) .StartValue(0.004563) .EndValue(0.04976) .Label(l => l.Format(f => f .Type(Format.FixedPoint) .Precision(3) )) ) .SliderMarker(sm => sm .Format(f => f .Type(Format.FixedPoint) .Precision(4) ) .CustomizeText(@<text> function() { return this.valueText + " mg/L"; } </text>) ) .Behavior(b => b.SnapToTicks(true)) .Title("Select a Lead Concentration in Water") )
using DevExtreme.NETCore.Demos.Models.SampleData; using Microsoft.AspNetCore.Mvc; using System.Linq; namespace DevExtreme.NETCore.Demos.Controllers { public class RangeSelectorController : Controller { public ActionResult CustomFormatting() { return View(); } } }
#range-selector { height: 440px; width: 100%; }