Skip to content

D3 Chart Reference

DataGlass renders 34 chart types through its D3 engine, organized into categories by visualization purpose. Each chart type includes configuration options for customizing appearance, data mapping, and interactivity. Browse by category below or use the quick start template to create your first chart.

Quick Start

View Source
type: bar
engine: d3
data:
  source: '[{"category": "A", "value": 30}, {"category": "B", "value": 45}, {"category": "C", "value": 28}, {"category": "D", "value": 52}]'
x: category
y: value
title: Sample Bar Chart
width: 500
height: 300

Chart Categories

Basic Charts

Foundational chart types for comparing categories, tracking trends, finding correlations, and showing proportions.

ChartTypeDescription
Bar ChartbarCompare values across categories with rectangular bars
Line ChartlineReveal trends by connecting data points in sequence
Scatter ChartscatterDiscover correlations by plotting x/y coordinates
Area ChartareaEmphasize magnitude with filled regions under lines
Pie ChartpieDisplay parts of a whole as angular slices
Funnel ChartfunnelShow conversion rates through sequential stages
Gantt ChartganttDisplay project timelines with task bars

Analysis Charts

Explore statistical distributions, identify outliers, and understand data spread across groups.

ChartTypeDescription
BoxplotboxplotSummarize distributions with quartiles and outliers
HistogramhistogramShow frequency distribution across value ranges
HeatmapheatmapDisplay 2D data with color intensity
RidgelineridgelineCompare distributions with stacked density plots
ViolinviolinCombine boxplot statistics with density shapes
ContourcontourMap 2D point density as topographic contours
BollingerbollingerOverlay price data with volatility bands

Hierarchy Charts

Visualize nested relationships and tree-structured data with spatial layouts.

ChartTypeDescription
TreemaptreemapPack hierarchy into nested rectangles by size
SunburstsunburstArrange levels as concentric rings from center
Circle Packingcircle-packingNest circles within circles for containment
DendrogramdendrogramDraw branching tree diagrams with connections
IcicleicicleStack rectangular segments from root to leaves
Tidy Treetidy-treeLay out trees with optimized node spacing

Network Charts

Map connections, flows, and relationships between entities in your data.

ChartTypeDescription
Force-DirectedforceArrange nodes using physics simulation
SankeysankeyTrace quantity flows between stages
Arc Diagramarc-diagramConnect ordered nodes with curved arcs
ChordchordShow inter-group flows around a circle
Directed Chorddirected-chordShow directional flows with arrow ribbons
Edge Bundlingedge-bundlingBundle dense connections into curved paths
Parallel Setsparallel-setsVisualize categorical data flow

Radial Charts

Transform linear charts into circular layouts using polar coordinates.

ChartTypeDescription
Radial Barradial-barWrap bars around a central point
Radial Arearadial-areaCreate radar displays in polar form

Time Series Charts

Specialized charts for temporal sequences, financial data, and period comparisons.

ChartTypeDescription
CandlestickcandlestickDisplay OHLC price movements per period
SlopeslopeCompare values between two time points
HorizonhorizonCompress series into layered color bands

Dot Charts

Preserve individual data points while preventing visual overlap.

ChartTypeDescription
BeeswarmbeeswarmArrange points to prevent overlap via simulation

Animation Charts

Show change over time with motion that reveals transitions between states.

ChartTypeDescription
Bar Racebar-raceAnimate ranked bars competing over time
StreamgraphstreamgraphFlow stacked areas around a shifting baseline

Marks-Only Mode

Create Observable Plot-style composable visualizations using pure mark layers without a base chart type. This mode gives you complete control over what visual elements appear in your chart.

Usage

Omit the type field and specify only marks to enter marks-only mode:

View Source
engine: d3
title: Multi-Mark Composition
width: 500
height: 300
marks:
  - type: dot
    x: temperature
    y: humidity
    fill: steelblue
    r: 4
  - type: line
    x: temperature
    y: humidity
    stroke: steelblue
    strokeWidth: 2
data:
  source: '[{"temperature": 20, "humidity": 45}, {"temperature": 22, "humidity": 50}, {"temperature": 25, "humidity": 55}, {"temperature": 28, "humidity": 52}, {"temperature": 30, "humidity": 60}]'

Available Marks

Primary marks: dot, line, bar, area, text, rule, tick, frame

Statistical marks: regression, box

Network marks: link, arrow

Special marks: cell, waffle, density, hexbin, contour

See the Marks Reference for complete documentation.


Common Configuration

All charts share these base options:

ParameterTypeDefaultDescription
typestringrequiredChart type identifier
engine'plot' | 'd3''plot'Rendering engine
xstringrequiredX-axis field
ystringrequiredY-axis field
widthnumber600Chart width in pixels
heightnumber400Chart height in pixels
titlestring-Chart title
subtitlestring-Chart subtitle
xLabelstring-X-axis label
yLabelstring-Y-axis label
colorstring-Field for color encoding
colorSchemestring'schemeCategory10'D3 color scheme
marginobject{top:20,right:20,bottom:30,left:40}Chart margins

Layout Presets

yaml
layout: compact     # Minimal margins
layout: default     # Standard spacing
layout: spacious    # Extra padding
layout: presentation # Large text, wide margins

Color Schemes

yaml
colorScheme: schemeCategory10   # 10 distinct colors
colorScheme: schemeTableau10    # Tableau palette
colorScheme: schemePaired       # Paired colors
colorScheme: schemeSet3         # Pastel set

Released under the MIT License. Built by Boundary Lab.