LineWidth

live example

Explore the API in the live example.

api reference

LineWidth()
Component implementing the line width features. When this component is available for a widget, its API is exposed via the .lineWidth namespace.
LineWidth.lineWidth(policy)
Sets the line width policy. Supported policies:
  • Default line width policy (no arguments): The default line width is used for all lines. The value of the default line width depends on the widget.
  • Single number (passing number): The specified line width is used for all lines.
  • Custom line width mapping (passing an Object): Plots that are listed as property name have the line width specified as the value for.

Parameters

NameTypeDescription
policystring, ObjectLine width policy to set. Default value depends on the widget that has this component.

Returns

Widget
Reference to the Widget's API.
LineWidth.mapping(key)
Returns the current line width mapping for a key.

Parameters

NameTypeDescription
keystringKey to return line-width for.

Returns

string
The current line width in pixels with the 'px' suffix.