Skip to content
Plotcnbeta
DocsChartsBlocksPlaygroundThemesExamples
Get started
Guide
  • Introduction
  • System Design
  • Engine Strategy
  • Installation
  • Project Setup
  • shadcn/ui Setup
  • Plotcn Registry
Fundamentals
  • Usage
  • Theming
  • Accessibility
  • Motion & Animation
  • Performance
  • TypeScript & I18n
Google Charts
  • Google Charts
  • Google GeoChart
Docs/Fundamentals/Theming

Theming

Fundamentals

One visual language across every engine.

Plotcn uses semantic CSS variables and small engine adapters so Recharts, D3.js, and Google Charts belong to the same application without pretending to share the same rendering API.

CSS VariablesTailwindDark ModeEngine AdaptersAccessible ColorSource-owned
Semantic Chart Token Bridgeoklch luminance calibrated
var(--chart-1, oklch(0.87 0 0))

Plotcn Visual Hierarchy & Token Translation

Single Source of Truth
1. Application Semantic Tokens (shadcn / Tailwind)globals.css
--background--foreground--card--border--muted--primary
↓
2. Plotcn Chart Semantic RolesUnified Contract
Surface--card
Gridlines--border
Axis Text--muted
Series 1--chart-1
Series 2--chart-2
Tooltips--popover
↓
Recharts Adapter
Direct CSS Variables

Consumes var(--chart-1) directly on SVG stroke and fill props.

D3.js Adapter
React SVG + Scale Bridge

Passes CSS tokens to React JSX paths or interpolates RGB values in math scales.

Google Charts Adapter
Typed Options Mapper

Translates active CSS theme into strongly-typed Google Chart JavaScript options.

Theming model

Plotcn does not carry an isolated, proprietary theme engine alongside your application. Instead, it forms a cohesive pipeline that translates your application's design system into chart surfaces, gridlines, axis typography, and series marks.

Unified Theming Pipeline

Architecture Flow
STAGE 01shadcn / Tailwind
App Semantic Tokens

Surface & Structural Baseline

Carried Variables:
--background--foreground--border--card
STAGE 02globals.css (OKLCH)
Plotcn Chart Tokens

Categorical Visualization Identity

Carried Variables:
--chart-1--chart-2--chart-3..5
STAGE 03lib/google-charts & utils
Engine Token Adapters

Translates CSS Vars to Engine Contracts

Carried Variables:
theme-adapterrecharts-stroked3-scales
STAGE 04Recharts • D3.js • Google Charts
Multi-Engine Outputs

Rendered Pixel-Perfect Charts

Carried Variables:
SVG PathsHTML TooltipsCanvas Marks

One visual language

Theme the visualization system, not every chart independently. One-off hardcoded hex values in component files cause visual drift between charts, break dark mode transitions, and make future rebranding painful. Plotcn unifies visual roles across all engines using semantic CSS variables.
++

Inherit the application theme

Plotcn visualizations reuse existing application tokens defined by shadcn/ui and Tailwind CSS. Before creating a chart-specific token, the component inherits standard application variables:

  • Background & Card surfaces: var(--background), var(--card)
  • Text & Foreground: var(--foreground), var(--card-foreground)
  • Muted text & Subtitle labels: var(--muted-foreground)
  • Borders & Separators: var(--border)
  • Popover overlays: var(--popover), var(--popover-foreground)

The "Reuse Before Extend" Rule

The "Reuse Before Extend" Mapping Matrix

Zero Design Drift
Application Surface100% Shared

Chart cards and canvas backgrounds inherit host container surfaces naturally without explicit repainting.

Target Token:var(--background) / var(--card)
Cartesian GridlinesStructural

Horizontal and vertical guide lines match host separator borders at a restrained 6–10% opacity.

Target Token:var(--border) or subtle alpha
Axis Tick LabelsTypography

Timestamps, dollar units, and category ticks inherit secondary label typography and muted contrast.

Target Token:var(--muted-foreground)
Primary Data SeriesDedicated

Series marks require dedicated OKLCH categorical tokens to maintain visual punch and WCAG contrast.

Target Token:var(--chart-1)

By anchoring charts to your existing tokens, installing Plotcn never overwrites or clashes with your established design system.

++

Chart-specific tokens

For concerns specific to data visualization—such as distinct series colors and calibrated opacity scales—Plotcn defines a standard set of chart tokens in app/globals.css.

Plotcn Theme Token Registry

app/globals.css

These standard tokens are calibrated with consistent perceptual lightness across dark and light palettes. They can be inspected, copied, or overridden globally or locally.

Token Name
Swatch
Value (OKLCH)
Semantic Role
--chart-1
#f4f4f5
oklch(0.87 0 0)
Primary data series / leading metric line
--chart-2
#a1a1aa
oklch(0.556 0 0)
Secondary comparison series / previous period
--chart-3
#71717a
oklch(0.439 0 0)
Tertiary metric / forecast boundary
--chart-4
#52525b
oklch(0.371 0 0)
Supporting series / minor category fill
--chart-5
#3f3f46
oklch(0.269 0 0)
Baseline / subtle contextual series
--border
rgba(255,255,255,0.1)
oklch(1 0 0 / 10%)
Cartesian gridlines and chart outer borders
--muted-foreground
#a1a1aa
oklch(0.708 0 0)
XAxis & YAxis tick labels, units, and timestamps
--popover
#18181b
oklch(0.205 0 0)
Floating tooltip surface and legend badges
--chart-positive
#34d399
oklch(0.75 0.18 155)
Positive trend, profit, or target exceeded
--chart-negative
#f87171
oklch(0.65 0.22 25)
Negative trend, deficit, or critical threshold

Standard series tokens in OKLCH

Plotcn defines 5 categorical series tokens calibrated in the perceptual OKLCH color space to ensure uniform lightness and contrast:

app/globals.css
:root {  --chart-1: oklch(0.87 0 0);    /* Primary leading metric */  --chart-2: oklch(0.556 0 0);   /* Secondary comparison */  --chart-3: oklch(0.439 0 0);   /* Tertiary series */  --chart-4: oklch(0.371 0 0);   /* Supporting category */  --chart-5: oklch(0.269 0 0);   /* Baseline context */  --chart-positive: oklch(0.75 0.18 155); /* Semantic gain */  --chart-negative: oklch(0.65 0.22 25);  /* Semantic loss */}

Distinguishing series identity from semantic status

Never confuse series identity colors (--chart-1 through --chart-5) with semantic indicators (--chart-positive, --chart-negative). If a chart displays three different product tiers, use neutral categorical tones. Reserve green and red exclusively for metrics that carry true positive or negative meaning (e.g. Profit vs. Loss).

++

Series colors

Different data structures demand different color models. Do not treat all visual data as a categorical list of --chart-1 through --chart-5.

Data Encoding Color Models

Perceptual Semantics
CategoricalIndependent

Use when data represents distinct, qualitative categories (e.g. Products, Regions, Marketing Channels). No intrinsic numerical ordering.

SequentialMagnitude

Use when data progresses continuously from low to high magnitude (e.g. Heatmaps, Population Density, Choropleth GeoCharts).

DivergingTwo-Sided

Use when data has a meaningful neutral zero or baseline point (e.g. Profit vs. Loss, Budget Variance, Temperature Deviation).

1. Categorical data

Use for independent, qualitative categories where order does not imply value (e.g. Desktop vs. Mobile vs. Tablet traffic). Each series receives a distinct, distinguishable tone from --chart-1 to --chart-5.

2. Sequential data

Use when data encodes a continuous numeric progression from low to high magnitude (e.g. population density choropleths, heatmap intensities). Use a single color scale with graduating lightness or saturation rather than multiple unrelated hues.

3. Diverging data

Use when data measures deviation from a meaningful central baseline or target (e.g. budget variance, quarterly net profit/loss). Two contrasting hues diverge from a neutral midpoint.

++

Chart colors & customization hierarchy

Plotcn implements a four-tier color resolution hierarchy:

TEXT
Plotcn theme tokens (app/globals.css)        ↓component semantic defaults        ↓optional component color overrides (e.g. primaryColor, referenceColor)        ↓series-level overrides where supported

1. Theme-native defaults

When no color prop is explicitly supplied, components resolve their marks from CSS variables:

  • color / primaryColor defaults to var(--chart-1)
  • referenceColor / rangeColor defaults to var(--chart-2)
  • milestoneColor defaults to var(--chart-milestone-pin)

This ensures that switching between Light and Dark mode dynamically updates the visualization without hardcoded color lock-in.

2. Component-level semantic overrides

Every chart component exposes semantic color properties reflecting its specific visual architecture:

TSX
// Single-series override<SignalLine data={data} xKey="date" color="#2563eb" />// Two-role comparison<TwinlineCompare  data={data}  xKey="date"  primaryColor="#2563eb"  referenceColor="#a1a1aa"/>// Forecast with range envelope<RangeLine  data={data}  xKey="date"  color="#2563eb"  rangeColor="#93c5fd"/>// Trend with milestones<MilestoneLine  data={data}  xKey="date"  color="#2563eb"  milestoneColor="#71717a"  milestones={milestones}/>

Explicit custom colors remain fixed across Light and Dark theme changes, preserving intentional brand styling while theme presets adapt automatically.

++

Grid, axes, and labels

Visual hierarchy is essential for readable charts. The data marks must always command visual attention; supporting structure must remain secondary.

Visual Contrast Hierarchy

Readability Discipline
Tier 1Data Marks (Lines, Bars, Dots)
100% Contrast

Primary visual focus. Uncompromised saturation and highest contrast against background surface.

Tier 2Axis Labels & Timestamps
65–80% Contrast

Secondary scanning context. Readable when inspected, but steps back to avoid overpowering data peaks.

Tier 3Cartesian Gridlines
6–12% Contrast

Tertiary orientation aids. Must remain quiet; if gridlines are noticed first, the chart is over-emphasized.

Gridline Design Rule

If the grid is one of the first things you notice, it is too strong. Grid lines should assist the eye when scanning values, not compete with the data. In Plotcn, gridlines are rendered with subtle borders (var(--border)) or a quiet 6–10% white/black opacity.

Axis typography conventions

  • Typography: Axis labels inherit your application's font stack (var(--font-sans) or var(--font-mono)).
  • Color: Rendered in var(--muted-foreground) so timestamps and unit labels never overpower chart peaks.
  • Borders: Avoid harsh, solid axis baseline rules unless separating stacked facets.
++

Tooltips and legends

Engine default tooltips frequently look disjointed from the rest of an application. Plotcn standardizes the visual language of overlays and legends regardless of the underlying chart library.

Standardized Tooltip & Legend Layout

Consistent Popover Anatomy
Overlay Tooltip Box
May 2026Active Period
Current Revenue:
$18,400
Previous Period:
$15,200

Standardizes font sizing (11-12px), hairline borders (--border), compact spacing, and tabular numeric alignment.

Inline Chart Legend
Current
Baseline
Target

Legends use small, high-contrast series pills that remain fully keyboard focusable and ARIA-attributed if interactive.

Tooltip visual language

  • Container: Rendered on var(--popover) with hairline border (var(--border)) and soft ambient shadow.
  • Typography: Compact 11–12px font matching your application theme.
  • Alignment: Tabular numbers (font-variant-numeric: tabular-nums) ensure clean column alignment when comparing multi-series metrics.
  • Indicators: Small, circular color pills matching the series stroke or fill.

Accessible legends

Legend items mirror application badge and pill components. If clicking a legend item toggles series visibility, that item must provide keyboard focus indicators (outline: var(--ring)) and accessible ARIA pressed states.

++

State theming

Visualization shells must handle intermediate states (loading, empty, error) without breaking visual harmony.

Loading states

Render a neutral skeleton shell or subtle pulsing container on var(--muted). Never render fake metrics or randomized placeholder curves during loading.

Empty states

When an array contains zero records, display a quiet container with an icon and clear message: "No activity recorded for this period." Never render empty axes floating in a void.

Error states

If data fetching or geometry compilation fails, contain the failure within the chart card using ChartBoundary. Display a respectful alert without painting the entire card bright red.

++

Dark and light modes

Plotcn visualizations adapt automatically when toggling between light, dark, and system themes.

Side-by-Side Surface & Token Comparison

Zero Flicker Transition
Light Mode (:root)
oklch(1 0 0)
Metric Activity$24,500
JanFebMarAprMay
Background: Clean crisp white (#ffffff)
Gridlines: Muted grey 10% alpha
Series 1: Deep titanium / black for maximum contrast
Dark Mode (.dark)
oklch(0.145 0 0)
Metric Activity$24,500
JanFebMarAprMay
Background: Deep zinc (#09090b)
Gridlines: Subtle white 6% alpha
Series 1: Crisp white (#f4f4f5) for maximum contrast

Single application theme toggle

There is no separate "chart theme toggle". Because Plotcn charts bind to CSS variables under :root and .dark, they re-render or restyle instantly alongside the rest of the application.

app/globals.css
/* Light Mode */:root {  --background: oklch(1 0 0);  --foreground: oklch(0.145 0 0);  --border: oklch(0.922 0 0);  --chart-1: oklch(0.205 0 0);  /* Deep contrast titanium in light mode */}/* Dark Mode */.dark {  --background: oklch(0.145 0 0);  --foreground: oklch(0.985 0 0);  --border: oklch(1 0 0 / 10%);  --chart-1: oklch(0.87 0 0);   /* Crisp high-luminance white in dark mode */}
++

Recharts theming

Recharts components in Plotcn consume CSS variables directly on SVG presentation attributes, eliminating the need for massive JavaScript configuration objects.

components/charts/plot-line-chart.tsx
import { Area, CartesianGrid, XAxis, YAxis, Tooltip } from "recharts"<CartesianGrid  vertical={false}  stroke="var(--border)"  strokeDasharray="3 5"/><XAxis  dataKey="label"  tick={{ fill: "var(--muted-foreground)", fontSize: 11 }}  axisLine={false}  tickLine={false}/><Area  type="monotone"  dataKey="value"  stroke="var(--chart-1)"  fill="url(#gradient)"  strokeWidth={2}/>

When the user toggles dark mode, the browser updates CSS variable values instantly without requiring component re-renders or canvas repaints.

++

D3.js theming

React-rendered D3 visualizations bind CSS variables directly to JSX elements, preserving seamless theme synchronization:

components/charts/d3-plot.tsx
// Direct CSS variable binding on SVG marks<path  d={pathGenerator(data) ?? ""}  stroke="var(--chart-1)"  strokeWidth={2}  fill="none"/><line  x1={0}  x2={width}  y1={yPos}  y2={yPos}  stroke="var(--border)"  strokeDasharray="4 4"/>

Calculated color scales in D3

When D3 mathematical scales require concrete color values (e.g. scaleLinear().range(["#27272a", "#f4f4f5"]) for continuous heatmaps), avoid scattering getComputedStyle() calls throughout your render loop. Centralize color resolution or use static perceptual token arrays.

++

Google Charts theming

Google Charts renders inside isolated containers that do not inherit application CSS variables automatically. Plotcn bridges this difference using a dedicated theme adapter.

Google Theme Translation Pipeline
STEP 01
App CSS Variables

Reads --background, --foreground, --chart-1 ... --chart-5

STEP 02
Plotcn Theme Resolver

Extracts computed HSL/OKLCH color values at runtime

STEP 03
Typed Google Options

Builds Google ChartOptions (colors, backgroundColor, fontName)

STEP 04
chart.draw(data, options)

Draws canvas/SVG with correct theme without brittle DOM mutation

The Google theme adapter (lib/google-charts/theme.ts)

lib/google-charts/theme.ts
export function getGoogleChartTheme(userOptions = {}) {  const baseTheme = {    backgroundColor: "transparent",    colors: ["#f4f4f5", "#a1a1aa", "#71717a", "#52525b", "#3f3f46"],    legend: {      textStyle: { color: "#a1a1aa", fontSize: 11 }    },    hAxis: {      textStyle: { color: "#71717a", fontSize: 11 },      gridlines: { color: "rgba(255, 255, 255, 0.06)", count: 5 }    },    vAxis: {      textStyle: { color: "#71717a", fontSize: 11 },      gridlines: { color: "rgba(255, 255, 255, 0.06)", count: 5 }    }  }  return deepMerge(baseTheme, userOptions)}

Redraw on theme change

When the user toggles dark mode, the Google Charts wrapper detects the theme change via MutationObserver or useTheme and triggers chart.draw() with newly resolved options. The external Google script is never reloaded.

++

Customize the theme

You can customize chart themes globally in your stylesheet or scope specific palettes to individual dashboard cards.

1. Global palette customization

To change your application's default chart palette, update the tokens in app/globals.css:

app/globals.css
:root {  /* Custom Emerald / Teal palette */  --chart-1: oklch(0.7 0.15 155);  --chart-2: oklch(0.6 0.14 175);  --chart-3: oklch(0.5 0.12 195);}

2. Scoped card overrides

To apply a custom palette to a single chart (e.g. a financial report card), set scoped CSS variables directly on the container:

app/dashboard/financial-card.tsx
<div  className="rounded-xl border border-border p-6"  style={{    "--chart-1": "oklch(0.75 0.18 155)", // Positive gain    "--chart-2": "oklch(0.65 0.22 25)",  // Negative loss  } as React.CSSProperties}>  <PlotLineChart data={financialData} /></div>

Customization Escalation Hierarchy

Customization Escalation Hierarchy

Follow the principle of progressive specificity: solve styling with tokens first before reaching for inline styles or source modifications.

Broadest Scope→Source Code
01Application Tokens
Global App Scope
TARGET:app/globals.css

Set once in globals.css; all charts inherit theme surfaces, text, and borders automatically.

Default (90% of cases)Active View
02Plotcn Chart Tokens
All Visualizations
TARGET:app/globals.css (:root & .dark)

Calibrate --chart-1 through --chart-5 in OKLCH to define your product's visualization identity.

Series Palette (8% of cases)Click to view →
03Scoped Overrides
Single Widget Instance
TARGET:Parent Container style={{ ... }}

Inject CSS variable overrides onto a parent card or wrapper to localize visual exceptions.

Contextual (2% of cases)Click to view →
04Local Source Edits
100% Owned Source File
TARGET:components/charts/plot-line-chart.tsx

Edit the installed component file directly to customize SVG markup, math, gradients, and animations.

Deep Customization (<1%)Click to view →
Level 01: Application Tokens Implementation

Theme the application, not every chart independently. Plotcn charts automatically inherit standard shadcn/ui variables (--background, --foreground, --card, --border). Updating your primary brand or card surface synchronizes every chart in your application with zero visual drift.

/* app/globals.css */
:root {
  --background: oklch(0.14 0 0);
  --foreground: oklch(0.98 0 0);
  --card: oklch(0.18 0 0);
  --border: oklch(0.24 0 0);
}
ESCALATION RULE:Escalate to Level 2 when you need to configure multi-series visualization hues (lines, bars, areas).
++

Semantic color

Color in data visualization is an informational encoding, not mere decoration.

  • Category: Identifies distinct series without implying hierarchy.
  • Magnitude: Darker or more saturated hues convey higher intensity.
  • Direction: Diverging scales measure deviation from a target or zero line.
  • Status: Positive, negative, or warning thresholds.

Never Rely on Color Alone

Color must never be the sole indicator of critical data. Up to 8% of male users experience color vision deficiency. Always pair color with text labels, signs (+/-), stroke patterns (solid vs. dashed), or distinct geometric markers.
++

Contrast and accessibility

All Plotcn theme tokens adhere strictly to WCAG visualization accessibility guidelines.

Theme Contrast & Accessibility Verification

WCAG Compliant
Axis Tick Labels

Meets 4.5:1 text contrast against --background in both light and dark modes.

Gridline Subordination

Stays within 10-20% opacity to prevent visual clutter or competition with data marks.

Series Differentiation

Provides secondary encoding (stroke dashes, dot shapes, or direct labels) alongside color.

Focus Ring Indicator

Interactive chart elements carry visible outline using var(--ring) on keyboard tab.

Tooltip Legibility

Rendered with high-contrast font and explicit solid background on var(--popover).

Motion Preference

Respects prefers-reduced-motion by disabling animations during theme switches.

Key contrast rules

  • Text contrast: All axis labels, tick marks, and tooltip text must meet at least 4.5:1 contrast against --background or --popover.
  • Adjacent marks: Adjacent bars or stacked slices must maintain discernible lightness differences or thin separating borders (--border).
  • Focus rings: Interactive data elements must display visible outlines using var(--ring) on keyboard focus.
++

Motion and emphasis

Plotcn emphasizes visual hierarchy through typography, opacity, and stroke weight rather than excessive bright neon colors or distracting animations.

  • Stroke Weight: Primary metric lines use strokeWidth={2}; comparison benchmarks use strokeWidth={1.5} with dash patterns (strokeDasharray="4 5").
  • Soft Fills: Area gradients use soft alpha stops (stopOpacity={0.16} tapering to 0) to ground charts without obscuring gridlines.
  • Reduced Motion: All transitions respect the prefers-reduced-motion media query by disabling entry animations during theme switches.
++

Common mistakes

Diagnostic guidance for common visualization theming pitfalls:

Common Theming Pitfalls & Architectural Solutions

Diagnostic Checklist
Hardcoding Hex Colors in Components

PROBLEM:Every chart file contains '#18181b', '#71717a', etc. Changes require editing dozens of files.

WHY:Circumvents the centralized design system.

FIX:Replace hex literals with CSS tokens like 'var(--chart-1)' or 'currentColor'.
Using One Palette for All Data Types

PROBLEM:Categorical series, heatmaps, and profit/loss graphs all reuse the same five unrelated colors.

WHY:Conflates qualitative identity with quantitative magnitude.

FIX:Use sequential scales for continuous data and diverging scales for positive/negative variance.
Engine Default Styles Leak In

PROBLEM:Recharts looks on-brand, but Google Charts looks like a stock blue-and-red Google demo.

WHY:Google Charts requires an explicit options theme adapter.

FIX:Wrap Google charts with getGoogleChartTheme() from '@/lib/google-charts'.
Overpowering Grid Contrast

PROBLEM:Dark, thick gridlines dominate the chart and make thin lines or small points hard to distinguish.

WHY:Grid is drawn with high contrast instead of subtle alpha.

FIX:Lower grid opacity to 6-12% using 'rgba(255, 255, 255, 0.06)' or 'var(--border)'.
Confusing Series Identity with Status

PROBLEM:Green is assigned to 'Product Series B', confusing users who interpret green as 'Healthy / Success'.

WHY:Mixing decorative categorical colors with semantic indicator tokens.

FIX:Reserve green and red for semantic indicators. Use neutral zinc tones for series identity.
Inconsistent Tooltip Appearance

PROBLEM:Recharts renders custom HTML tooltips while D3 renders browser title tags or disparate boxes.

WHY:Lack of a shared tooltip styling convention.

FIX:Standardize tooltip markup to reuse the application's '--popover' and '--border' tokens.
Inline Theme Logic in Every Component

PROBLEM:Every chart component imports 'useTheme' and runs manual color branching.

WHY:Unnecessary JavaScript overhead and hydration mismatch risk.

FIX:Let CSS variables handle theme switching natively. Only adapt in JS when strictly necessary.
Global Overwrites That Break UI

PROBLEM:Overriding '--chart-1' accidentally changes unrelated button or sidebar styles.

WHY:Chart tokens were incorrectly mapped to global brand tokens.

FIX:Keep chart tokens scoped to '--chart-1' through '--chart-5' rather than overriding '--primary'.
++

Recommended workflow

Follow this 10-step sequence when establishing or customizing your visualization theme:

10-Step Theming Implementation Sequence

Design System Workflow
01
Audit App Tokens

Inspect existing --background, --foreground, and --border tokens in globals.css

02
Reuse Core Tokens

Inherit application surface and text colors before adding custom variables

03
Define Chart Tokens

Set calibrated --chart-1 through --chart-5 for series in OKLCH

04
Configure Dark Mode

Provide high-contrast values under both :root and .dark selectors

05
Map to Recharts

Pass CSS variables directly to stroke and fill props on chart marks

06
Map to D3.js

Consume tokens in React SVG or resolve computed RGB values for scales

07
Map to Google Charts

Pass typed theme object from lib/google-charts/theme.ts

08
Standardize Tooltips

Style overlay popovers to match application popover tokens

09
Audit Contrast

Verify 4.5:1 text contrast and ensure colors are not the sole encoding

10
Ship Cohesive UI

Commit tokens to version control with zero manual chart repainting

Theme Responsibility Matrix
[CSS Variable]Background & Card Surfaces
Inherits --background and --card natively.
[CSS Variable + Engine]Series Line / Bar Colors
Read from --chart-1..5 across all visualizers.
[CSS Variable]Cartesian Gridlines
Mapped to --border or 6-10% subtle alpha.
[CSS Variable]Axis Typography & Ticks
Inherits app font family and --muted-foreground.
[Shared Convention]Tooltips & Legend Layout
Popovers styled with --popover and subtle borders.
[Local Source]Geometry & Math Scales
Calculated in component (viewBox, scaleLinear, etc.).
++

Next steps

Now that you understand Plotcn's theming system and token architecture, explore accessible visualization practices:

Installation

Prepare a React or Next.js project and install required dependencies.

shadcn/ui Setup

Configure components.json and integrate Plotcn with the shadcn Registry.

Registry Workflow

Learn how visualization components enter your local source tree.

PreviousUsageNextAccessibility

On this page

  • Theming model
  • Inherit the application theme
  • Chart-specific tokens
  • Series colors
  • Chart colors & customization hierarchy
  • 1. Theme-native defaults
  • 2. Component-level semantic overrides
  • Grid, axes, and labels
  • Tooltips and legends
  • State theming
  • Dark and light modes
  • Recharts theming
  • D3.js theming
  • Google Charts theming
  • Customize the theme
  • Semantic color
  • Contrast and accessibility
  • Motion and emphasis
  • Common mistakes
  • Recommended workflow
  • Next steps