Quire UI

Analytics dashboard

An analytics overview where everything follows one day and one source: point at the chart and the cards read it, pin a day, pick a source, drag to set the dates.

Overview

Visitors

Visitors by day
DayVisitors

Top pages

Top sources

Countries

Signup funnel

Devices

Point along the chart and the four cards read that day. Click a day to pin it, and the lists, the funnel and the devices follow it. Pick a source in Top sources and the whole page filters to its visitors, each source converting at its own rate: the cards slide to the new figures and every chart glides there. Drag across the chart to make those days the range, pick a card to chart it, and try "Last 7 days" or "Q3" in the dates.

Everything compares with the period before: the cards' changes, the dashed line behind the chart, each list row's change, the funnel's conversion in points with its earlier shape as an outline, and each device's share.

Installation

npx shadcn@latest add @quireui-pro/analytics-dashboard

It installs components/analytics-dashboard/analytics-dashboard.tsx with example traffic beside it in data.ts, and every component it is built from.

Using it

Replace data.ts with your own numbers: days returns a day's figures for any range, ranked the rows of a list with the period before, fromSource the days for one source, and devices the split by device. The range is a Date range picker value, so "Last 30 days" stays the last 30 days tomorrow; read its dates with resolveRange wherever you load data, and its comparison with comparedRange.

The sidebar is the same Sidebar as the App shell. If your app already has one, keep everything inside SidebarInset and drop the rest.

Built from

  • Stat card: the four figures, each choosing what the chart shows, all following the chart's cursor
  • Chart: the day under the cursor, a pinned day, a range drawn by dragging, the period before and the launch as notes
  • Bar list: following the pinned day, each row with its change; Top sources filters the page
  • Funnel: the pinned day's conversion against the period before
  • Donut: visitors by device, each share against the period before
  • Date range picker: presets, typed ranges and the comparison
  • Sidebar, Card, Avatar and Button

On this page