XRange
live example
Explore the API in the live example.
api reference
XRange()
Component implementing the Y range constraints. This component enables setting the horizontal min/max boundaries for a chart. When this component is available for a widget, its API is exposed via the
.xRange
namespace.XRange.compressMax([value])
Compresses the X axis by expanding the upper boundary of the X range with the specified fraction of the total range.
Parameters
Name | Type | Description |
---|---|---|
value | number | optionalScaling factor to expand the upper boundary with. Default value is 0 . |
Returns
Widget
Reference to the Widget's API.
XRange.compressMin([value])
Compresses the X axis by expanding the lower boundary of the X range with the specified fraction of the total range.
Parameters
Name | Type | Description |
---|---|---|
value | number | optionalScaling factor to expand the lower boundary with. Default value is 0 . |
Returns
Widget
Reference to the Widget's API.
XRange.max(value)
Sets the upper boundary for the X axis.
Parameters
Name | Type | Description |
---|---|---|
value | number, null | The upper boundary to set. If null, the calculated upper boundary is used. |
Returns
Widget
Reference to the Widget's API.
XRange.min(value)
Sets the lower boundary for the X axis.
Parameters
Name | Type | Description |
---|---|---|
value | number, null | The lower boundary to set. If null, the calculated lower boundary is used. |
Returns
Widget
Reference to the Widget's API.