Skip to main content

Dashboard Components

The dashboard module is a self-contained analytics engine built on Recharts. It provides a plug-and-play dashboard with lazy loading, drag-and-drop layout, tabbed navigation, and a flexible chart configuration API.

Exports

ExportTypeDescription
GenericDashboardComponentFull dashboard shell with tabs, lazy charts, and parameter forms
DashboardTabsComponentTab navigation bar
ReportChartComponentSingle chart card with parameter form
GenericChartComponentRaw chart renderer (bar, line, pie, area)
GroupedChartComponentGrouped/stacked bar or line chart
KpiCardsGridComponentResponsive grid of KPI metric cards
TableChartComponentTabular data chart
parseReportToChartConfigUtility fnConverts API report response to chart config
formatValueUtility fnHuman-readable number/currency formatting
formatAxisValueUtility fnAbbreviated axis label (1K, 1M, etc.)
parseNumericValueUtility fnSafe numeric parsing
rotateArrayUtility fnRotate chart color array
CHART_COLORSConstantDefault chart palette (16 colours)
DEFAULT_SERIES_COLORSConstantSeries colour assignment map
BLUE_PALETTEConstantBlue tint palette array
DUMMY_TABSConstantSample tab definitions for development
DUMMY_CHART_DEFINITIONSConstantSample chart definitions for development
DUMMY_CHART_DATAConstantSample chart data for development

Import

import { GenericDashboard, KpiCardsGrid, GenericChart, CHART_COLORS } from "@xocialive/ui-components";

Quick start

See GenericDashboard for a full working example.