Legend

Documentation Index

Fetch the complete documentation index at: /llms.txt. Use this file to discover all available pages before exploring further.

Legends that identify each data series in a chart.

Usage

<EvilLineChart
  xDataKey="month"
  data={data}
  chartConfig={chartConfig}
  legendVariant="circle" | "square" | "circle-outline" // and so on
/>

Variants

Control the legend indicator style with the legendVariant prop.

Square

legendVariant='square'

Circle

legendVariant='circle'

Circle Outline

legendVariant='circle-outline'

Rounded Square (Default)

legendVariant='rounded-square'

Rounded Square Outline

legendVariant='rounded-square-outline'

Vertical Bar

legendVariant='vertical-bar'

Horizontal Bar

legendVariant='horizontal-bar'

API Reference

PropTypeDefaultDescription
legendVariantsquare|circle|circle-outline|rounded-square|rounded-square-outline|vertical-bar|horizontal-bar"rounded-square"

Style of the legend indicator icon.

hideLegendbooleanfalse

Hides the legend entirely.

hideIconbooleanfalse

Hides the color icon next to each item, leaving only label text.

alignleft|center|right"right"

Horizontal alignment of the legend items.