Channel label
Top-left channel name (e.g. "HR", "Power") with a semi-transparent backdrop so a graph line cannot mask the text.
Primitive:
ChannelLabelInteractive demo
Usage
import { ChartRoot, ChannelLabel } from '@ramtt/charts'
<ChartRoot data={data} height={200}>
<ChannelLabel text="Power">Power</ChannelLabel>
</ChartRoot>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children* | ReactNode | — | Rendered label content |
| text* | string | — | Plain text used to size the backdrop |
| x | number | 4 | X position in px |
| y | number | 12 | Y position in px |