Primitives
Animated Number Avatar Badge Button Button Group Toggle Toggle Group Checkbox Chip Countdown Divider Fab Grid Icon Image Input Search Input Textarea Label Loader Marquee Masked Input Message Bubble Notification Banner Offline Banner Progress Progress Ring Radio Group Range Slider Rating Separator Skeleton Slider Stack Stepper Switch Text Theme Toggle Ticker Typing IndicatorComposed
Accordion Achievement Badge Action Bar Action Sheet Action Swap Activity Rings Add to Cart Button Address Card Agenda List Alert Amount Keypad Animated Icons App Bar Audio Message Audio Recorder Autocomplete Avatar Group Balance Display Bar List Barcode Before After Biometric Gate Bloom Menu Bottom Sheet Paywall Sheet Side Sheet Breadcrumb Calendar Calendar Strip Card Carousel Cart Item Character Charts Chat Composer Chat List Item Choice Card Circle Reveal Coach Marks Collapsible Collapsible Header Color Picker Combobox Command Palette Comment Thread Confetti Consent Sheet Context Menu Copy Field Country Picker Coupon Input Currency Input Data Table Date Range Picker Day Schedule Dialog Dock Donut Chart Drawer Driver Card Dropdown Menu Drum Picker Emoji Picker Empty State Error State Event Card Expandable Control Fader Feature Gate File Picker Filter Bar Follow Button Form Gauge Glass Glass Cluster Glass Dock Morph Glass Fab Morph Glass Lab Glass Orb Glass Search Morph Glass Sheet Edge Gradient Button Headline New Heatmap Image Cropper Image Viewer Kanban Card Keyboard Avoiding Keyboard Toolbar Leaderboard Level Progress Lightbox Like Button Line Chart List Reorderable List Swipeable Row Location Card Location Search Map Sheet Map View Markdown View Media Controls Media Picker Media Tile Mention Input Meter Bar Mini Player Mood Slider Morphing Modal Multi Select Navigation Rail Notification Item Number Input Onboarding Pager Order Card Order Summary OTP Input Pagination Paper Clip New Parallax Header Pass Card Password Strength Payment Button Payment Card Payment Method Permission Primer Phone Input PIN Pad Polaroid New Poll Popover Post Card Postage Stamp New Price Tag Pricing Table Product Card Product Gallery Profile Header Promo Banner Prompt Input Property Card Pull To Refresh QR Code Quick Actions Quick Replies Rating Summary Reaction Picker Resend Timer Review Card Review Prompt Ride Option Save Button Scan Frame Scroll Spy Tabs Seat Map Section Header Section Index Segmented Control Select Share Button Share Sheet Shutter Button Signature Pad Slide to Confirm Slot Picker Smart Banner Social Login Button Sparkline Splash Screen Split Button Stat Card Stateful Button Status Dot Step Flow Steps Sticker New Stopwatch Stories Progress Stories Viewer Story Ring Streak Counter Streaming Text Success Seal Swipe Deck Tabs Tag Input Tape New Text Reveal Thinking Indicator Time Picker Timeline Timer Ring Tip Selector Toast Toolbar Tooltip Track Row Transaction Row Trip Progress Variant Picker Video Controls Waveform Weather Card Weekday Picker Zoom TransitionScreens
Account Switcher Biometric Setup Delete Account Forgot Password Grow Auth Login Login — Dark Stage Login — Dense Work Login — Editorial Login — Illustrated Login — Minimal Ink Login — Social Login — Video Loop Food Onboarding Onboarding Onboarding Dark Objects Onboarding Editorial Onboarding Illustrated Onboarding Personalize Onboarding Photo Carousel OTP Verification Passkey — Create Password Reset Permission — Notifications Phone Verification Onboarding Quiz Session Devices Signup Sign-up Chat Sign-up Photo Sheet Social Auth Split Auth Verify Identity Welcome AI Chat AI Assistant Channels List Chat Info Chat List Chat Media Chat Thread Create Group Group Info Message Requests New Message Kept Messages Accessibility Activity Log Appearance Authenticator Blocked Accounts Export Your Data Downloads Edit Profile Edit Profile — Rows Emergency Call Empty States Set Error State Send Feedback Device Locator Help Center Home — Bento Home — Dark Home — Editorial Home Feed Invite Friends Language & Region Linked Accounts Not Found (404) Notification Settings Notifications Password Vault Paywall Paywall — Comparison Paywall — Dark Stage Paywall — Editorial Paywall — Photo Paywall — Trial Timeline Privacy Profile Profile — Gamified Profile — Minimal Profile — Photo Hero QR Scanner Report Issue Saved Items Phone Time Search Search — Command Palette Search — Visual Account Health Settings Settings — Dark Device Settings — Search Storage & Data Terms & Privacy Dating Chat Dating Filters Profile Discover Its A Match Into You Matches Profile Detail Profile Editor Courier Matching Delivery History Delivery Support Package Schedule Parcel Tracking Proof Of Delivery Quick Aisle Quick Home Send Package Substitutions Add Payment Address Book Cart Categories Checkout Checkout — Steps Checkout Success Delivery Filters & Sort Flash Sale Gift Cards Loyalty Points Order Cancel Order Detail Orders Pay Later Checkout Payment Methods Product Detail Product Detail — Hero Product Grid Product Reviews Promo Codes Recently Viewed Return Items Search Results Shop Assistant Store Home Tip & Rate Courier Order Tracking Wishlist Write a Review Event Checkin Event Hero Events Discover My Tickets Seat Selection Ticket Checkout Add Card Bank Accounts Dashboard — Bento Bill Pay Budgets Card Details Crypto Portfolio Finance Dashboard Dashboard — Dark Exchange Currency Expense List Invoice Detail Manage Cards Plan Management Savings Goals Send Money Spending Analytics Split Bill Subscriptions Token Detail Token Swap Transactions Wallet Home Wallet Movers Courier Tracking Food Cart Food Home Food Orders Grocery List Recipe Detail Restaurant — Dark Restaurant Detail Activity Rings Fitness Home Habit Quest Habit Tracker Meal Planner Med Store Meditation Player Mood Check-in Nutrition Home Period Tracker Prior Auth Prior Auth Cases Quest Complete Run Tracking Rx Scan Sleep Tracker Telehealth Booking Walk Map Water Tracker Workout Complete Workout Detail Workout Session Applications Apply Company Interview Schedule Job Detail Job Feed Resume Saved Jobs Create Listing Item Chat Listing Detail Make Offer Market Checkout Market Home Market Search My Listings Offers Inbox Seller Profile Audiobook Player Camera Gallery Albums Game Store Mini Player Music Player Photo Editor Photo Gallery Playlist Detail Podcast Player Clips Feed Serene Home Sound Mixer Stories Video Call Video Player Article Reader Course Detail Event Detail Memory Onboarding Icon Lab Leaderboard Lesson Player Match Detail News Editorial News Home Plant Care Prediction Live Prediction Welcome Smart Home Standings Ticket Wallet Topics Follow Weather Detail Add Task Sheet Alarm Clock Calendar Day Calendar Month Doc Scanner File Manager Focus Timer Journal Kanban Board Mail Inbox Mail Thread Note Editor Notes List Reminders Task List Time Blocks Agent Profile Compare Homes Mortgage Calculator Property Detail Rental Application Saved Homes Schedule Tour Search List Search Map Complete Destination Driver Arriving Ev Charging History Home In Trip Matching Options Parking Receipt Safety Schedule Scooter Unlock Booking Confirmed Booking Review Booking Slots My Bookings Pro On The Way Provider Detail Provider List Rate Service Services Home Arc Create Arc Detail Arc Onboarding Avatar Creator Comments Sheet Create Post Explore Grid Followers List Hashtag Feed Mentions Post Detail Post Hero Social Profile Boarding Pass Booking Confirm Car Rental Trip Discover Flight Live Flight Preferences Flight Results Flight Search Hotel Detail Live Transit Trip — Map Day Trip — Rideshare Request Seat Select Travel Home Trip Itinerary Trip OnboardingNothing matches — try another word.
Line Chart
ProLive line and area chart that draws itself in and reshapes smoothly between ranges. Drag along the line and the header rolls to that point, or use two fingers to measure the change between two.
Preview
Pro source · 1,496 lines
Part of LumioUI Pro. With Pro, the full file shows here and npx @lumioui/cli add pro/line-chart writes it into your repo. Unlocking your Pro source… Couldn't load the source. Refresh to try again.
import { LineChart } from "@/components/ui/line-chart/line-chart";
export function Example() {
return (
<LineChart />
);
} Installation
Install the dependencies
npx expo install react-native-reanimated react-native-svg react-native-gesture-handlerAdd the components it builds on
Copy the source from the Code tab into your project
components/ui/line-chart/line-chart.tsxcomponents/ui/line-chart/index.tsUpdate the import paths to match your project setup.
Usage
import { LineChart, LineChartLegend } from "@/components/ui/line-chart/line-chart"; <LineChart /> Also exported: LineChartLegend.
Examples
A home-energy app comparing this year's monthly use with last year's.
Pro source · 76 lines
Part of LumioUI Pro. With Pro, the full file shows here and npx @lumioui/cli add pro/line-chart-compare writes it into your repo. Unlocking your Pro source… Couldn't load the source. Refresh to try again.
A trail-run activity page.
Pro source · 103 lines
Part of LumioUI Pro. With Pro, the full file shows here and npx @lumioui/cli add pro/line-chart-elevation writes it into your repo. Unlocking your Pro source… Couldn't load the source. Refresh to try again.
A brokerage stock page that is live.
Pro source · 181 lines
Part of LumioUI Pro. With Pro, the full file shows here and npx @lumioui/cli add pro/line-chart-stock writes it into your repo. Unlocking your Pro source… Couldn't load the source. Refresh to try again.
A wellbeing app's weight trend.
Pro source · 113 lines
Part of LumioUI Pro. With Pro, the full file shows here and npx @lumioui/cli add pro/line-chart-weight writes it into your repo. Unlocking your Pro source… Couldn't load the source. Refresh to try again.
API reference
LineChart
below* string } — to* number } | null) => void — data number[] Single-series shorthand. Ignored when series is set.
dataLabel string Name of the single data series (callout + screen reader). Default "Value".
"Value" series LineChartSeries[] One or more series. Keep to four or fewer; a legend is the caller's job.
—labels string[] Per-point label shown while reading (a date, a km mark).
—xLabels string[] Evenly spaced axis labels under the plot.
—height number Plot height in pt (excluding header, x labels and range tabs). Default 200.
200 curve "smooth" | "linear" | "step" "smooth" (default), "linear", or "step" for balances that change in jumps.
"smooth" color string Single-series stroke colour (hex). Default theme primary.
—area boolean Area wash for the single data series. Default true.
true strokeWidth number Line weight. Default 2.
2 reference LineChartReference Dashed reference line with an optional label.
—referenceFill { above: string Single series with a reference: fill the area against the reference line, tinted above where the line is over it and below where it is under (hex, e.g. success / destructive).
minMax boolean Label the highest and lowest point of the first series. Default false.
false grid number Horizontal gridlines with value labels. Pass a count (e.g. 3). Default 0.
0 domain [number, number] Fixed y domain. Default fits the data (and the reference line).
—formatValue (value: number) => string Format values in labels, callout, header and screen-reader text.
—scrubbable boolean Allow press-and-drag reading. Default true.
true measurable boolean Two-finger measure between two points. Default true when scrubbable.
—callout boolean Floating value callout over the read point. Default true, false when header is set.
header boolean | LineChartHeader Built-in reading header above the plot. true uses the defaults.
trend boolean Colour a single series by direction: accent when the header value is at or above its baseline, destructive below. Default false.
false live boolean Live data: a static dot marks the latest point, and appended points extend the tail instead of reshaping the line. Default false.
false capacity number Fixed number of x slots (e.g. 78 five-minute bars in a session). The line fills the first data.length of them, leaving the rest of the day open to the right. Default: the data length.
onScrub (index: number | null) => void Fires when the scrubbed index changes; null on release.
onMeasure (span: { from: number Fires when a two-finger measure changes; null on release.
ranges readonly string[] Range tabs under the plot (1D, 1W, 1M…). Swap data on change to morph the path.
range string Controlled range.
—defaultRange string Uncontrolled initial range. Default the first entry.
—onRangeChange (range: string) => void — accessibilityLabel string Screen-reader summary. Default describes the first series.
—className string — LineChartLegend
series* Pick<LineChartSeries, "key" | "label" …
Pick<LineChartSeries, "key" | "label" | "color" | "dashed">[] Same series array the chart renders — colours resolve the same way.
—className string —