Line charts
Nine examples for targets, comparisons, and trends over time.
Sales and targets
Actual sales and target by period
View data
Setup
Download the shared Inlay assets once. Then choose HTML, React, or Vue and copy the example above.
Cash flow
Inspect cash over selectable periods, including months below zero.
Cash flow
Monthly net cash position
View data
Revenue performance
Switch reporting periods and export the visible data as CSV.
Revenue performance
Recognized revenue by month
View data
Social activity
Compare activity across three networks using labeled strokes.
Social activity
Interactions by channel
View data
E-commerce sales
Compare sales and storefront traffic on separate scales over selectable periods.
E-commerce sales
Revenue and storefront traffic
View data
Platform metrics
Select a metric to change the line, units, and data table.
Platform metrics
Choose a metric to inspect weekly performance
View data
Market price
Track a collection’s floor price with selectable history and an accented surface.
Collection floor price
Price in USD
View data
Variance sparklines
Compare signed movement across three compact cards with a zero baseline.
Revenue variance
Change from baseline
View data
Conversion change
Rate change from baseline
View data
Performance drift
Deviation from target
View data
Current balance
Read a balance headline and inspect the daily changes under it.
Current balance
Daily settlement history
View data
Usage
| Data | Pass { labels, series } with one value per label in each series. Give a series a stable id to retain its selection when it moves. Supported tones are blue, teal, violet, magenta, success, warning, and danger. |
|---|---|
| HTML | Import setChartData from @inlay-ui/foundation/chart-data. Call setChartData(chartElement, data) with the article marked data-ilui-chart whenever your data changes. |
| React and Vue | The copied snippet separates sampleData from chartOptions. Pass live data from React state or a Vue ref. For examples with multiple charts, pass an array of datasets in display order. |
| Empty data | Pass null or empty arrays to show the empty state. Omit the data prop or pass undefined to restore the sample data. |
| Keyboard | Focus the plot and use the arrow keys to inspect values. Home and End jump to the first and last points. |
| Accessibility | Every plot has a data table. Series use labeled swatches and distinct stroke patterns when several are visible. |