Line Chart

A line chart is a visual representation that shows quantitative data as a series of points connected by straight line segments.

Import#

import { LineChart } from '@saas-ui/charts'

Usage#

Basic#

Basic composition with Card and Heading components. LineChart requires a fixed height (eg height="300px") to render properly.

Revenue over time

Jan 1Jan 22Feb 12Mar 5Mar 26Apr 16May 7May 28Jun 18$0.00$1,000.00$2,000.00$3,000.00$4,000.00$5,000.00
Revenue
Live edit

Multiple categories#

Multiple categories can be displayed in the same chart. Categories map to the data object keys.

Developers

Dec 1Dec 4Dec 7Dec 10Dec 13Dec 16Dec 19Dec 22Dec 25Dec 28Dec 3101530456075
Backend
Frontend
Live edit

Customize colors#

Use the colors prop to customize the chart colors. Supported formats are primary, purple, purple.400, or #4FD1C5.

Developers

Dec 1Dec 4Dec 7Dec 10Dec 13Dec 16Dec 19Dec 22Dec 25Dec 28Dec 3101530456075
Backend
Frontend
Live edit

Was this helpful?