LineConfig
Example
ts
{
color: '#1a1a1a',
width: 1,
style: 'dashed',
dashes: [5, 3],
endDotSize: 5
}Properties
color
- Type:
string - Default:
'#1a1a1a'
Specify the line's color using a CSS color string.
style
- Type:
'solid'|'dashed' - Default:
'solid'
width
- Type:
number - Default:
1
Specify line width in pixels.
dashes
- Type:
number[] - Default:
[5, 5]
An array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). Takes effect only if style is 'dashed'.
See setLineDash() for more information.
endDotSize
- Type:
number - Default:
0
Specify line end dot size (radius in pixels).
TypeScript
ts
interface LineConfig {
color?: string;
style?: 'solid' | 'dashed';
width?: number;
dashes?: number[];
endDotSize?: number;
}