RetailysUI

Charts & Data Visualization

Enterprise-grade chart components built with Recharts and styled to match Retailys UI Design Framework tokens. Every chart uses semantic CSS variables for full dark mode support.

RechartsDark Mode Ready

Metric Cards

KPI cards with sparkline area charts, trend indicators, and FeaturedIcons. Perfect for dashboard headers.

$48.2K

Total Revenue

+12.5%vs last period

2,420

Active Users

+8.1%vs last period

3.6%

Conversion Rate

-2.3%vs last period

4m 32s

Avg. Session

+5.7%vs last period
PropTypeDefaultDescription
title*string-Metric label.
value*string-Display value (formatted).
change*string-Percentage change text (e.g. '+12.5%').
trend*"up" | "down"-Determines color and arrow direction.
icon*React.FC-FeaturedIcon icon component.
sparklinenumber[]-Mini area chart data points for the sparkline.

Area Chart

Gradient-filled area charts for time-series data. Uses SVG linear gradients with opacity fade for a polished look.

Revenue Overview

Monthly revenue, cost, and profit

Revenue
Cost
Profit

Line Chart

Clean multi-series line charts with custom tooltips and interactive dots. Ideal for comparing trends over time.

Website Traffic

Daily visitors, page views, and sessions

Visitors
Page Views
Sessions

Bar Charts

Vertical and horizontal bar charts for categorical comparisons. Grouped bars for year-over-year analysis.

Quarterly Revenue

This year vs last year

This Year
Last Year

Revenue by Country

Top 6 markets

Stacked Area Chart

Layered area charts showing composition and total over time. Device breakdown with gradient fills.

Traffic by Device

Monthly breakdown: Desktop, Mobile, Tablet

Desktop
Mobile
Tablet

Pie & Donut Charts

Circular charts for proportion visualization. Donut variant with center label and interactive hover states.

Traffic Sources

Conversion breakdown by channel

Direct35%
Organic27%
Referral15%
Social12%
Email7%
Paid4%

Traffic Distribution

Full pie chart variant

Direct4,200
Organic3,200
Referral1,800
Social1,400
Email900
Paid500

Radar Chart

Multi-axis radar chart for performance scoring and capability comparison across multiple dimensions.

Performance Audit

Current vs previous period

Current
Previous

Activity Rings

Daily activity gauge

Move78%
Exercise62%
Stand91%

Composed Chart

Mixed chart combining bars, lines, and areas in a single view. Useful for correlating different metrics on the same timeline.

Sales & Orders

Revenue (bars), orders (line), and conversion rate (area)

Sales ($)
Orders
Conv. Rate

API Reference

Props documentation for the chart wrapper components used throughout this page.

ChartCard

Card container for wrapping any Recharts chart with a consistent header and styling.

PropTypeDefaultDescription
title*string-Card heading displayed at the top.
subtitlestring-Supporting text below the title.
children*ReactNode-Chart content — typically a ResponsiveContainer.
legend{ label: string; color: string }[]-Inline legend items rendered in the header.
actionsReactNode-Optional right-aligned header actions (filters, toggles, etc.).

CustomTooltip

Styled tooltip matching Retailys UI Design Framework design tokens.

PropTypeDefaultDescription
activeboolean-Whether the tooltip is currently visible.
payloadArray<{ name, value, color }>-Data entries for the hovered point.
labelstring-X-axis label for the hovered point.

Design Tokens

CSS variables used for chart colors. These automatically adapt in dark mode.

TokenCSS VariableUsage
Brand
--color-brand-500Primary data series
Indigo
--color-indigo-500Secondary series
Purple
--color-purple-500Tertiary series
Blue
--color-blue-500Information series
Success
--color-success-500Positive metrics
Warning
--color-warning-500Caution indicators
Error
--color-error-500Negative metrics
Pink
--color-pink-500Additional series
Orange
--color-orange-500Additional series
Gray
--color-gray-400Comparison / baseline
Grid Line
--color-border-secondaryChart grid lines
Axis Text
--color-text-tertiaryAxis labels and ticks