D3 Examples

DESN 270 Data Visualization · Queens College, CUNY · D3.js v5

  1. 01
    Simple bar chartBars from an array of data
  2. 02
    Loading a CSVSame chart, data from data.csv
  3. 03
    MarginsUsing the margin convention
  4. 04
    AxisAdding a scale axis with ticks
  5. 05
    AnimationTransitions, duration and easing
  6. 06
    Hover tooltipmouseover, mousemove and mouseout
  7. 07
    Pie chartPie layout, arcs and color scales
  8. 08
    Column chartVertical bars with a band scale

Edit in your browser: open the whole set in StackBlitz, no install needed.
Work locally: download the zip. Examples that load data.csv need a local server (e.g. VS Code Live Server), since opening the file directly will not load the data.