layout: default title: SliderTickConfig parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Widgets

SliderTickConfig Class

Object specification for configuring ticks on the slider. An array of these objects should be set on the tickConfigs property.
ArcGIS Maps SDK for JavaScript

public class SliderTickConfig : dymaptic.GeoBlazor.Core.Components.MapComponent

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 SliderTickConfig

Constructors

SliderTickConfig() Constructor

Parameterless constructor for use as a Razor component.

public SliderTickConfig();

SliderTickConfig(Nullable, Nullable, IReadOnlyCollection, Nullable, string, string) Constructor

Constructor with parameters for use in C# code.

public SliderTickConfig(System.Nullable<dymaptic.GeoBlazor.Core.Components.Widgets.TickConfigMode> mode=null, System.Nullable<double> singleValue=null, System.Collections.Generic.IReadOnlyCollection<double>? values=null, System.Nullable<bool> labelsVisible=null, string? tickCreatedFunction=null, string? labelFormatFunction=null);

Parameters

mode System.Nullable<TickConfigMode>

The mode or method of positioning ticks along the slider track. See the table below for a list of possible values.

singleValue System.Nullable<System.Double>

Indicates where ticks will be rendered below the track. Use Values for multiple values. See the description for mode for more information about how this property is interpreted by each mode.

values System.Collections.Generic.IReadOnlyCollection<System.Double>

Indicates where ticks will be rendered below the track. Use SingleValue for single values. See the description for mode for more information about how this property is interpreted by each mode.

labelsVisible System.Nullable<System.Boolean>

Indicates whether to render labels for the ticks.

tickCreatedFunction System.String

Callback that fires for each tick. You can override default behaviors and styles with this property.

labelFormatFunction System.String

Callback for formatting tick labels.

Properties

SliderTickConfig.LabelFormatFunction Property

Callback for formatting tick labels.

public string? LabelFormatFunction { get; set; }

Property Value

System.String

Remarks

Because this function must resolve synchronously, it cannot be used in Blazor. Instead, pass in valid JavaScript code as a string. This code has access to three parameters (value, type, and index) and must return a string. See ArcGIS Maps SDK for JavaScript for more information.
Example value:
“””
return (type === “value”) ? value.toFixed(0) : value;
“””;

SliderTickConfig.LabelsVisible Property

Indicates whether to render labels for the ticks.

public System.Nullable<bool> LabelsVisible { get; set; }

Property Value

System.Nullable<System.Boolean>

SliderTickConfig.Mode Property

The mode or method of positioning ticks along the slider track. See the table below for a list of possible values.

public System.Nullable<dymaptic.GeoBlazor.Core.Components.Widgets.TickConfigMode> Mode { get; set; }

Property Value

System.Nullable<TickConfigMode>

SliderTickConfig.SingleValue Property

Indicates where ticks will be rendered below the track. Use Values for multiple values. See the description for mode for more information about how this property is interpreted by each mode.

public System.Nullable<double> SingleValue { get; set; }

Property Value

System.Nullable<System.Double>

SliderTickConfig.TickCreatedFunction Property

Callback that fires for each tick. You can override default behaviors and styles with this property.

public string? TickCreatedFunction { get; set; }

Property Value

System.String

Remarks

Because the attributes this function exposes are in HTML, they must be set in JavaScript, and it doesn’t make sense to pass them to C#. Instead, pass in valid JavaScript code as a string. This code has access to three parameters (value, tickElement, and labelElement). See ArcGIS Maps SDK for JavaScript for more information.
Example value:
“””
tickElement.classList.add(“largeTicks”);
labelElement.classList.add(“largeLabels”);
labelElement.onclick = function() {
const newValue = labelElement[“data-value”];
slider.values = [ newValue ];
};
“””;

SliderTickConfig.Values Property

Indicates where ticks will be rendered below the track. Use SingleValue for single values. See the description for mode for more information about how this property is interpreted by each mode.

public System.Collections.Generic.IReadOnlyCollection<double>? Values { get; set; }

Property Value

System.Collections.Generic.IReadOnlyCollection<System.Double>