Skip to content

Annotation

Connor Lamoureux edited this page Nov 3, 2023 · 3 revisions

**Annotation only supports Bar components at this time.

The Annotation component is used to display a text annotation. The annotation will display at the top of the bar for each data point in data.

Screen Shot 2023-03-29 at 9 02 46 AM
<Chart data={data}>
    <Bar {...props}>
        <Annotation textKey="textKey" style={{width: 48}} />
    </Bar>
</Chart>

Props

name type default description
textKey string The key on each value in the data passed to the chart that contains the text to display in the annotation.
style {width: number} - Style overrides. Width is used in place of dynamically calculated width.