retro ui logo
RetroUI
  • Components
  • Blocks
  • Templates
  • Figma
Sign InGet Access

Getting Started

IntroductionInstallationThemesChangelogMCP ServerBlocksProTemplatesProFigma KitPro

Components

AccordionAlertAvatarBadgeBreadcrumbButtonCardCalendarCarouselCheckboxCommandDialogDrawerNewEmptyNewInputLabelLoaderMenuContext MenuPopoverProgressRadioSelectSliderSonnerSwitchTabTableTable Of ContentsNewTextareaTextToggleToggle GroupTooltip

Chart

Bar ChartUpdatedLine ChartArea ChartPie Chart

Utilities

cn
RetroUI

RetroUI

The platform for developers and designers who love unique, playful, and brutalist design.

PRODUCT
  • OS Components
  • UI Blocks
  • Templates
  • Figma Kit
  • Themes
  • Neo Screenshot
SUPPORT
  • Pricing
  • FAQ
  • Documentation
  • Changelog
  • Discord Community
  • Email Support
COMPANY
  • Blog
  • Contact
  • Terms of Use
  • Privacy Policy
Footer decoration

© 2026 AZENCOT LLC. ALL RIGHTS RESERVED.

Line Chart

A customizable line chart component to visualize trends and data over time with smooth curves and data points. 📉

Source


Installation

pnpm dlx shadcn@latest add 'https://retroui.dev/r/line-chart.json'


Examples

Default



Multiple Lines



API Reference

PropTypeDefaultDescription
dataRecord<string, any>[][]Array of data objects to display
indexstring-Key for the x-axis (category) data
categoriesstring[][]Array of keys for the data values to display as lines
strokeColorsstring[]["var(--foreground)"]Array of stroke colors for the lines
strokeWidthnumber2Width of the line strokes
dotSizenumber4Size of the data point dots
tooltipBgColorstring"var(--background)"Background color for tooltips
tooltipBorderColorstring"var(--border)"Border color for tooltips
gridColorstring"var(--muted)"Color for the grid lines
valueFormatter(value: number) => string(value) => value.toString()Function to format values
showGridbooleantrueWhether to show grid lines
showTooltipbooleantrueWhether to show tooltips on hover
classNamestring-Additional CSS classes

Last Updated: 12 Aug, 2025

On this Page

  • Installation [#installation]
  • Examples [#examples]
    • Default [#default]
    • Multiple Lines [#multiple-lines]
  • API Reference [#api-reference]