ValueMarkerConfig
A value marker displays a horizontal line and/or label at a specific value on the y-axis, typically used to highlight the last visible or last known data point.
Example
ts
{
mode: 'last-visible',
line: { color: '#1a1a1a', width: 1, style: 'dashed' },
label: { backgroundColor: 'white', borderColor: '#1a1a1a' }
}Properties
mode
- Type:
ValueMarkerMode - Default:
'last-visible'
Determines which data point the marker tracks.
line
- Type:
false|LineConfig - Default:
null(no line)
Configuration for the marker's horizontal line. Set to false to hide the line, or provide a LineConfig object for custom styling.
label
- Type:
false|BoxedValueLabelConfig
Configuration for the marker's value label. Set to false to hide the label, or provide a BoxedValueLabelConfig object for custom styling.
TypeScript
ts
type ValueMarkerMode = 'last-visible' | 'last-data';
interface ValueMarkerConfig {
mode?: ValueMarkerMode;
line?: false | LineConfig;
label?: false | BoxedValueLabelConfig;
}