Vue Chart - valueAxis.visualRange

Defines the axis' displayed range. Cannot be wider than the wholeRange.

Selector: DxVisualRange
Type:

Object

|

Array<Number | String | Date>

Raised Events: onOptionChanged
Cannot be used in themes.

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 axis's valueType. You can also set one of the array values to null to specify an open-ended range.

    visualRange: [50, 70]
    // Open-ended range
    visualRange: [null, 70]
  • An object with the startValue and endValue fields

    An alternative to the two-item array.

    visualRange: {
        startValue: 50,
        endValue: 70
    }
    // Open-ended range
    visualRange: {
        startValue: null,
        endValue: 70
    }
  • An object with the length and a startValue or endValue field

    Specifies the range using a start or end value and length.

    visualRange: {
        startValue: 50,
        length: 20
    }
    // ===== or =====
    visualRange: {
        endValue: 70,
        length: 20
    }
  • An object with the length field

    Sets the range of the specified length using the last axis value as the end value.

    visualRange: {
        length: 20
    }

To specify the minimum visual range that a user can set, use the minVisualRangeLength property.

The specified visual range is adjusted automatically when the argument axis is zoomed and panned. Set adjustOnZoom to false to disable this behavior.

See Also

endValue

The range's end value.

Selector: end-value
Type:

Number

|

Date

|

String

Default Value: undefined
Raised Events: onOptionChanged

length

The range's length.

Selector: DxLength
Default Value: undefined

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.

Selector: start-value
Type:

Number

|

Date

|

String

Default Value: undefined
Raised Events: onOptionChanged