shadcn.io is not affiliated with official shadcn/ui
Linear Stats Integration Block for React
An integration stats section for a cycle-planning tool reading finished issues from Linear: a framed strip plot of days to done on one 0 to 14 day axis, four team lanes with a dot per issue and a median tick, and a headline that names the slowest issue.
Installation
Overview
An integration stats section for React with Base UI, written for Cyclemoor, a fictional cycle-planning tool, and the finished issues it reads from Linear. A compact header names the slowest issue and its days, worked out from the data ("MOB-98 was the slowest, at 12 days"), with a sentence giving the highest and lowest team medians and the mark pair at its end. Under it, a framed strip plot (Guides corners) draws four team lanes (Web, API, Mobile and Data) on one shared axis of 0 to 14 days with a hairline every two days. Each finished issue is a dot, repeated days stack in a lane's rows, a tick marks each lane's median with the median in words beside the team's name, and the slowest issue is a ringed dot. The lanes are teams, never priorities. Every figure comes from one typed list of days per team, and the same issues are an unseen table inside the figure for screen readers. The block has no state and no script. It's built from Guides, with your theme's tokens for every colour. Linear is named in text only: no Linear logo, colour or wordmark ships with the block. Nothing is read from Linear, and the days are example data.
FAQ
How do I change the numbers?
Edit TEAMS at the top of the file: each team has a name, an issue-key prefix (key), a first issue number and the list of days its finished issues took, from started to completed. The medians, the dot rows, the headline's slowest issue, the highest and lowest medians in the sentence and the hidden table are all worked out from those lists. Change AXIS and TICKS together if your times run longer than 14 days.
What does a dot measure?
One finished issue: the days between it being started and being completed. In Linear an issue carries both dates, so a real product can compute the same number per issue and group it by team. The median is the middle value of a lane (the mean of the two middle values when a lane has an even number of issues). Nothing here is read from Linear: the days are example data.
How is the drawing available to a screen reader?
The plot is decorative and hidden from assistive technology. The figure's caption names it, each team's median is in the text beside its name ("Median 6.5 days") and the headline names the slowest issue. An unseen table inside the figure lists every issue with its team and days, and the table follows the plot as the figure's last child.
Why are the lanes teams, and how do I show something else?
Teams are what Linear groups issues by, and a lane's dots are comparable because they share one axis. A priority or a label would need its own lanes: replace TEAMS with your own groups and the layout adapts. Keep the lane count to a handful so the figure stays inside the section's height on a phone.
How does it fit on a phone, in right-to-left layouts and with reduced motion?
On a phone each lane puts the team and its median on one line with the plot under it, the dots shrink and the axis keeps every other label. Time runs from the start in every language, so the plots and the axis stay left to right (dir="ltr") inside a right-to-left layout while the team names flip. The header fades up once on load and nothing else moves; with reduced motion it simply appears.
Related
- Pro
Linear Detail Integration
Scopes and stepsAn integration detail section for a cycle-planning tool connecting to Linear: one framed panel with a three-way access level over a checklist of six permissions that grows with the level, the OAuth scopes it requests, and three install steps.
- Pro
Linear List Integration
Grouped and triagedAn integration list section for a cycle-planning tool reading issues from Linear's Triage: three real tabs, five issue rows with Accept and Decline always visible, a roving keyboard set (J, K, A, D) that only acts inside the list, and a working Retry.
- Pro
Linear Grid Integration
Cards and previewsAn integration grid section for a cycle-planning tool syncing with Linear: six issue fields on shared hairlines, each with a drawing of its two sides whose arrow flips and a three-button direction control, plus a derived tally.
- Pro
Linear Setup Integration
Guided stepsAn integration setup flow for a cycle-planning tool connecting to Linear in three steps: who comments and creates issues (an app or you, each with a drawn sample comment), the OAuth scopes to ask for, and a test issue with its draft card.
- Pro
Box Plot Stats
DistributionsFive box plots of delivery times on one shared axis in a band that runs from rail to rail, each with a whisker, a box for the middle half, a median line, hollow outlier dots and the median at the row's end.
- Pro
AWS Stats Integration
Bars and columnsAn integration stats section for a cloud cost tool reading from AWS: six region lanes on one 0 to 24 hour ruler showing how far each region's cost data runs behind, with a solid tick at the 6 hour agreement.