Charts Overview
django-d3-bridge provides 19 chart types organized in 5 categories.
All charts share the same API: declare in Python, render with {% d3_render %}.
Basic Charts
| Chart |
Class |
Best for |
| Bar |
BarChart |
Comparing categories, rankings |
| Line |
LineChart |
Trends over time, multi-series |
| Area |
AreaChart |
Volume over time, stacked composition |
| Pie & Donut |
PieChart / DonutChart |
Part-of-whole, proportions |
| Scatter |
ScatterPlot |
Correlations, distributions |
Geographic Charts
| Chart |
Class |
Best for |
| Choropleth |
ChoroplethMap |
Coloring regions by value |
| Bubble Map |
BubbleMap |
Sized markers on a map |
Network Charts
| Chart |
Class |
Best for |
| Force Graph |
ForceGraph |
Relationships, social networks |
| Sankey |
Sankey |
Flow quantities between stages |
| Chord |
ChordDiagram |
Bi-directional flows between entities |
Hierarchy Charts
| Chart |
Class |
Best for |
| Tree |
TreeDiagram |
Org charts, file trees, taxonomies |
| Treemap |
Treemap |
Proportional nested rectangles |
| Circle Packing |
PackCircle |
Nested proportions as circles |
| Sunburst |
Sunburst |
Hierarchical drill-down |
| Dendrogram |
Dendrogram |
Clustering, phylogenetics |
Statistical Charts
| Chart |
Class |
Best for |
| Contour |
ContourPlot |
Topographic heatmaps |
| Density |
DensityPlot |
2D point density estimation |
| Voronoi |
VoronoiDiagram |
Spatial partitioning, nearest-neighbor |
Common Parameters
All charts inherit these from the base Chart class:
| Parameter |
Type |
Default |
Description |
data |
QuerySet, list, dict |
None |
The data source |
height |
int |
400 |
Chart height in pixels |
width |
int |
None |
Chart width (None = fill container) |
title |
str |
None |
Chart title |
subtitle |
str |
None |
Subtitle below the title |
theme |
str |
"default" |
Theme name |
palette |
str or list |
None |
Override the theme's color palette |
animate |
bool |
True |
Enable entry animations |
tooltip |
bool or list |
True |
Enable tooltips (True, False, or list of fields) |
legend |
bool |
True |
Show legend |
responsive |
bool |
True |
Auto-resize on container change |
poll_url |
str |
None |
URL for auto-refresh polling |
poll_interval |
int |
0 |
Polling interval in seconds (0 = disabled) |
live |
bool |
False |
Enable MQTT live updates |
mqtt_broker |
str |
None |
MQTT WebSocket broker URL |
mqtt_topic |
str |
None |
MQTT topic to subscribe |