YRange
live example
Explore the API in the live example.
api reference
YRange()
Component implementing the Y range constraints. This component enables setting the vertical min/max boundaries for a chart. When this component is available for a widget, its API is exposed via the
.yRange
namespace.YRange.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.
YRange.compressMin([value])
Compresses the Y axis by expanding the lower boundary of the Y 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.
YRange.max(value)
Sets the upper boundary for the Y axis.
Parameters
Name | Type | Description |
---|---|---|
value | The upper boundary to set. If not set, the calculated upper boundary is used. |
Returns
Widget
Reference to the Widget's API.
YRange.min(value)
Sets the lower boundary for the Y axis.
Parameters
Name | Type | Description |
---|---|---|
value | The lower boundary to set. If not specified, the calculated lower boundary is used. |
Returns
Widget
Reference to the Widget's API.