Configure the appearance and behaviour of line.
| Option | Type | Default | Description |
|---|---|---|---|
data |
number[] |
— | Required. Array of data points |
colour |
string |
#000000 |
Hex color for the line |
label |
string |
line-0 |
Unique label for the series |
interpolation |
linear|cubic |
linear |
Line curve style |
style |
solid|dashed |
solid |
Line stroke pattern |
annotatePoints |
boolean |
false |
Show circles at data points |
area |
object |
— | Area fill configuration |
Choose how points are connected:
| Value | Description |
|---|---|
linear |
Straight lines between points |
cubic |
Smooth curves through points |
| Value | Description |
|---|---|
solid |
Continuous line (default) |
dashed |
Dashed line pattern |
Fill the region under a line:
{
area: {
fill: true;
}
}::: info When area color matches line color, 60% opacity is applied automatically. :::
Show markers at each data point with annotatePoints: true: