LineStyle
live example
Explore the API in the live example.
api reference
LineStyle()
Component implementing the line style features. When this component is available for a widget, its API is exposed via the
.lineStyle
namespace.LineStyle.getStrokeDashArray(style)
Returns the stroke-dasharray value for the specified style.
Parameters
Name | Type | Description |
---|---|---|
style | string | Line style to get stroke-dasharray value for. |
Returns
The value corresponding to the style.
LineStyle.lineStyle(policy)
Sets the line style policy. Supported policies:
- Default line style policy (no arguments): The default line style is used which is solid for all plots.
- Single line style (passing
string
): The specified line style is used for all plots. Supported styles are: solid, dashed, dotted. - Custom line style mapping (passing an
Object
): Plots that are listed as property name have the line style specified as the value for.
Parameters
Name | Type | Description |
---|---|---|
policy | string, Object | Line style policy to set. If not specified, the default policy is set which is solid for all plots. |
Returns
Object
Reference to the LineStyle API.