Tank Blazor API

Tank Properties

NameTypeDefaultDescription
CoerceboolfalseIf is set to true all values coerce to the interval, set in the interval property.
CustomIntervalboolfalseSets or gets whether custom ticks at (possibly) uneven interval will be plotted. The ticks to be plotted are defined with the property customTicks.
CustomTicksint[]new int[]{}If customInterval is enabled, sets a list of ticks to be plotted. If coerce is set to true, the value will snap to these ticks.
DateLabelFormatStringstring"d"Sets or gets the pattern which labels are displayed in when mode is 'date'.
DecimalSeparatorstring"".""Sets or gets the char to use as the decimal separator in numeric values.
DisabledboolfalseEnables or disables the widget.
Intervalobject1When cooerce property is true, all values coerce to the interval's value.
InvertedboolfalseSets the direction of the tank. If is true - positions of the tank's begin and end are changed.
LabelFormatFunctionobjectN/AA callback function that can be used to format the values displayed on the tank labels.
LabelsVisibilityLabelsVisibilityLabelsVisibility.AllSets or gets the widget's label visibility
Localestring"en"Sets or gets the locale. Used in conjunction with the property messages.
LogarithmicScaleboolfalseEnables or disables the usage of logarithmic scale in the widget.
Maxobject100Sets or gets the maximum value of the widget.
MechanicalActionDragMechanicalActionDragMechanicalAction.SwitchWhileDraggingSets or gets the type of used mechanical action.
MessagesobjectN/ASets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
Minobject0Sets or gets the minimum value of the widget.
ModeScaleModeScaleMode.NumericSets or gets whether the widget works with numbers or dates.
Namestring""Sets or gets the element's name, which is used as a reference when the data is submitted.
OrientationOrientationOrientation.VerticalSets the orientation of the widget
PrecisionDigitsintN/ADetermines the number of digits after the decimal point. Applicable only when scaleType is 'integer'.
ReadonlyboolfalseIf the widgets is readonly, the users cannot iteract with the element.
RightToLeftboolfalseSets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
ScalePositionScalePositionScalePosition.NearSets the position of the widget's scales.
ScaleTypeScaleTypeScaleType.FloatingPointSets the type of the tank's scale.
ScientificNotationboolfalseEnables or disables scientific notation.
ShowThumbLabelboolfalseEnables or disables displaying of the thumb label.
ShowTooltipboolfalseEnables or disables displaying of the tooltip.
ShowUnitboolfalseEnables or disables displaying of the units.
SignificantDigitsint0Determining how many significant digits are in a number. Applicable only when scaleType is 'integer'.
Themestring""Sets or gets the element's visual theme.
ThumbLabelPositionPositionPosition.NearSets or gets the position of the thumb label.
TicksPositionTicksPositionTicksPosition.ScaleSets or gets the position of the ticks in SmartTank widget.
TicksVisibilityTicksVisibilityTicksVisibility.MinorSets or gets the visibility of the ticks.
TooltipPositionPositionPosition.NearSets or gets the position of the tooltip in SmartTank widget.
UnfocusableboolfalseSets or gets if the element can be focused.
Unitstring"kg"Sets or gets the name of unit used in SmartTank widget.
ValidationValidationValidation.StrictSets the value's validation by min/max. If 'strict' is applied, the value is always validated by min and max. If 'interaction' is applied, programmatic value changes are not coerced to min/max and if min/max are changed, resulting in the current value being out of range, the value is not coerced, and no change event is fired.
Valueobject0Sets or gets the value of the SmartTank widget.
WordLengthWordLengthWordLength.Int32Sets or gets the word length. Applicable only when scaleType is 'integer'.

Tank Methods

NameTypeArgumentsDescription
GetOptimalSizeobjectN/AGets the optimal size of the widget.
GetValueAsync()Task<object>'N/A'Gets the &quot;Value&quot; property as Task&lt;object&gt;.
Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements.
Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render.
StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.
Valstringobject valueGet/set the value of the tank. Args: string value - The value to be set. If no parameter is passed, returns the displayed value of the tank.
ValstringN/AGet/set the value of the tank.
Valstringstring valueGet/set the value of the tank. Args: string value - The value to be set. If no parameter is passed, returns the displayed value of the tank.
Valstringint valueGet/set the value of the tank. Args: int value - The value to be set. If no parameter is passed, returns the displayed value of the tank.

Tank Events

NameTypeDescriptionEvent Detail
OnChangeEventCallback<Event>This event is triggered when the value of the tank is changed.N/A
Changedevent TankChangedEventHandlerThis event is triggered when the value of the tank is changed.TankChangedEventArgs

Enums

LabelsVisibility

LabelsVisibility.All
LabelsVisibility.EndPoints
LabelsVisibility.None

DragMechanicalAction

DragMechanicalAction.SwitchUntilReleased
DragMechanicalAction.SwitchWhenReleased
DragMechanicalAction.SwitchWhileDragging

ScaleMode

ScaleMode.Numeric
ScaleMode.Date

Orientation

Orientation.Horizontal
Orientation.Vertical

ScalePosition

ScalePosition.Near
ScalePosition.Far
ScalePosition.Both
ScalePosition.None

ScaleType

ScaleType.FloatingPoint
ScaleType.Integer

Position

Position.Near
Position.Far

TicksPosition

TicksPosition.Scale
TicksPosition.Track

TicksVisibility

TicksVisibility.Major
TicksVisibility.Minor
TicksVisibility.None

Validation

Validation.Strict
Validation.Interaction

WordLength

WordLength.Int8
WordLength.Uint8
WordLength.Int16
WordLength.Uint16
WordLength.Int32
WordLength.Uint32
WordLength.Int64
WordLength.Uint64