Skip to Content
BBRICKSv0.7.4
Screens

Analytics

Range and challenge filters, metric tiles, the trend, best sellers, products and sales by challenge.

Range and challenge filters, metric tiles, the trend, best sellers, products and sales by challenge. The composition is AnalyticsScreen.tsx; every part of it is a BRICKS export.

Analytics

Sales trend, the funnel and the breakdowns.

Pinned to TRNDR preset
Code
import { useLanguage } from '@ergasti/bricks';
import { AnalyticsScreen } from '../../../packages/bricks/src/gallery/screens/AnalyticsScreen';

function Analytics() { return <AnalyticsScreen language={useLanguage()} />; }

How it is built

  • Toolbar: Segmented range and a SelectBox (hideLabel) in filters, Export CSV in actions.
  • Four Tile size="metric" with deco, a Delta with "vs previous 30 days" (no sparkline, as in the mock), selected and onSelect. The selected tile picks the AreaTrend series.
  • AreaTrend in a Card, with xLabels.
  • Best creators: DataTable with RankMedal (inline), CreatorCell with tier, orders, Money compact (figure="creator_sales") and a ShareBar. It pages 5 at a time with Pager.
  • Products: ProductCell, and Money compact over a Delta per row; a row click opens the product drawer (see Details drawers).
  • Sales by challenge: HBars with display as Money compact, per-row tone, and selectable: false on the row that has no page.