PeakUIPro

Analytics DashboardNew

Revenue on track or not, and what moved it, on one screen.

Open full screen

The Screen

The one question is whether revenue is on track this month and what moved it. Four metrics answer the first half on one surface; the revenue chart against last month answers the second, and the channel split and the product table say where it came from. Colour sits on the data: the chart ramp is derived from the accent, and the accent itself appears once, on the primary action.

The sidebar folds to a drawer under lg; the metrics stack two by two on a phone; the table keeps its figures right-aligned and tabular at every width.

Made Of

Source

Copy the folder into your project. The screen imports @peakui/react, @peakui-pro/react and its chart subpaths, @gravity-ui/icons and react, and nothing else. Replace data.ts with your own rows; every total is computed from them.

analytics-dashboard/template.tsx
"use client"; // the period is state, and the charts are compound parts

import type {Key} from "react";

import {ArrowDown, ArrowUp, Bars, Bell, Receipt} from "@gravity-ui/icons";
analytics-dashboard/data.ts
/*
 * The data behind the dashboard. Every figure on the screen is derived from these rows, so the
 * metrics, the chart and the breakdowns agree with each other, and the same strings render on the
 * server and in the browser. Replace this file with your own source; keep the shapes.
 */
analytics-dashboard/sidebar.tsx
import type {ComponentType} from "react";

import {
  ChartColumn,
  Gear,
analytics-dashboard/revenue-chart.tsx
"use client"; // the chart is built from compound parts, which a server file cannot reach

import type {PeriodKey} from "./data";

import {Widget} from "@peakui-pro/react";
analytics-dashboard/products-table.tsx
import type {ProductRow} from "./data";

import {ArrowUpRight} from "@gravity-ui/icons";
import {Chip, Link} from "@peakui/react";
import {TrendChip, Widget} from "@peakui-pro/react";

On this page