Pins
live example
Explore the API in the live example.
api reference
Pins()
Component implementing the pins feature. A pins is a vertical line with a circle on the top and an optional text label as description. When this component is available for a widget, its API is exposed via the
.pins
namespace.Pins.add(id, position[, options[, duration]])
Adds a pins to the chart. If the pon ID already exists, no action is taken.
Parameters
Name | Type | Description |
---|---|---|
id | string | Unique identifier of the pins. |
position | number | Value to add pins to. |
options | Object | optionalPin design options. Supported values:
{} . |
duration | number | optionalDuration of the animation of adding the pins. Default value is 0 . |
Returns
Widget
Reference to the Widget's API.
Pins.remove([id[, duration]])
Removes one or all pins from the chart.
Parameters
Name | Type | Description |
---|---|---|
id | string | optionalIdentifier of the pins to remove. If pins with the specified identifier does not exist, no change is applied. If it is not specified, all pins are removed from the current chart. Default value is undefined . |
duration | number | optionalDuration of the remove animation. Default value is 0 . |
Returns
Widget
Reference to the Widget's API.