Get StartedComponentsStylingThemingMath & Science
MCP

Charts

Line Chart

Line charts with one or more series. Every example is live.

Markdown

Import

tsx
import { LineChart } from "@indoku/ui"

Examples

Basic

Hover a legend item to highlight its series.

050100150200250300JanFebMarAprMayJun

Dashed

Set dashed per series, or on the whole chart.

0100200300JanFebMarAprMayJun

Gradient

gradient fades the area under the line.

050100150200250300JanFebMarAprMayJun

Biaxial

Give a series axis: right for a second y axis.

05010015020025030000.511.522.53JanFebMarAprMayJun

Connect nulls

null leaves a gap unless connectNulls is set.

050100150200250300JanFebMarAprMayJun
050100150200250300JanFebMarAprMayJun

Series labels

seriesLabels prints the name at the end of each line.

050100150200250300JanFebMarAprMayJunRevenueCosts

Props

LineChart

PropTypeDefaultDescription
seriesChartSeries[]–Data. Values accept null; axis and dashed are per series.
categoriesstring[]–X labels.
gradient / areabooleanfalseFill under the line.
dashedbooleanfalseDash every line.
connectNullsbooleanfalseJoin across null values.
seriesLabelsbooleanfalseName at the end of each line.
legendbooleanfalseInteractive legend.
referenceLinesReferenceLineSpec[]–Horizontal guides.

* required. Style props and HTML attributes are accepted as well.

Created by @indokudev