Vue RangeSelector - value
The selected range (initial or current). Equals the entire scale when not set.
This property accepts one of the following:
A two-item array
Specifies the range's start and end. The array can contain a pair of numeric, string, or date-time values, depending on the scale's valueType. You can also set one of the array values to null to specify an open-ended range.
App.vue- <DxRangeSelector>
- <DxRangeSelector :value="[50, 70]" />
- </DxRangeSelector>
- <!-- Open-ended range -->
- <DxRangeSelector>
- <DxRangeSelector :value="[null, 70]" />
- </DxRangeSelector>
An object with the startValue and endValue fields
An alternative to the two-item array.
The following code snippet demonstrates value defined as a
<DxRangeSelector>attribute:App.vue- <DxRangeSelector :value="{ startValue: null, endValue: 70 }" />
- <!-- Open-ended range -->
- <DxRangeSelector :value="{ startValue: null, endValue: 70 }" />
The following code snippet demonstrates value defined as a
<DxValue>selector:Code- <DxRangeSelector>
- <DxValue startValue="50" endValue="70" />
- </DxRangeSelector>
- <!-- Open-ended range -->
- <DxRangeSelector>
- <DxValue :startValue="null" endValue="70" />
- </DxRangeSelector>
An object with the length and startValue or endValue
Specifies the range using length and start or end values.
The following code snippet demonstrates value defined as an attribute of
<DxRangeSelector>:App.vue- <DxRangeSelector :value="{ startValue: 50, length: 20 }" />
- <!-- or -->
- <DxRangeSelector :value="{ endValue: 70, length: 20 }" />
The following code snippet demonstrates value defined as a selector (
<DxValue>):Code- <DxRangeSelector>
- <DxValue startValue="50" length="20" />
- </DxRangeSelector>
- <!-- or -->
- <DxRangeSelector>
- <DxValue endValue="70" length="20" />
- </DxRangeSelector>
If you specify only length, the component defines the endValue property as the largest scale value.
See Also
endValue
The range's end value.
length
The range's length.
If the axis/scale displays numbers, set this property to a number:
- length: 100 // a hundred axis/scale values
If the axis/scale displays date-time values, set it to an accepted string value or object that contains a field described further in this section:
- length: 'day' // one day
- length: { days: 2 } // two days
startValue
The range's start value.