close
Latest version: v4.0.3

Beautiful charts,
effortlessly.

Re-usable, easy-interface JavaScript chart library built on D3 v4+. Render to SVG or Canvas from the same API — generate a chart in three lines.

Everything you need

Powerful defaults, endless customization.

Simple

Create a chart instantly with sensible defaults and extensive options.

🖇️

SVG & Canvas

One API, two renderers. Switch to canvas for high-density, large-data charts.

🧩

Modular ESM

Written as ES Modules with ES6+ syntax. Import only what you need.

🎨

Rich options

Combine hundreds of options and themes to match any design.

NEW in v4

One API,
two renderers.

The same chart config renders to SVG or Canvas. Canvas mode draws high-density scatter, line and area charts to a single <canvas> — smooth even with tens of thousands of points.

Renderer
Data points

5,000points
render time
Canvasbackend
render.mode: "canvas"

Get Started

Two steps to your first chart.

1. Setup: load & set holder
<!-- D3 (peer dependency) -->
<script src="https://d3js.org/d3.v7.min.js"></script>

<!-- billboard.js with base style -->
<script src="$YOUR_PATH/billboard.js"></script>
<link rel="stylesheet" href="$YOUR_PATH/billboard.css">

<!-- chart holder -->
<div id="chart"></div>
2. Generate a chart
<script>
  // bb is available as a global
  const chart = bb.generate({
    bindto: "#chart",
    data: {
      type: "bar",
      columns: [
        ["data1", 30, 200, 100, 170, 150, 250],
        ["data2", 130, 100, 140, 35, 110, 50]
      ]
    }
  });
</script>
import bb, {bar} from "billboard.js";
import "billboard.js/dist/billboard.css";

const chart = bb.generate({
  bindto: "#chart",
  data: {
    type: bar(),
    columns: [
      ["data1", 30, 200, 100, 170, 150, 250],
      ["data2", 130, 100, 140, 35, 110, 50]
    ]
  }
});
import bb, {scatter, canvas} from "billboard.js/canvas";
import "billboard.js/dist/billboard.css";

bb.generate({
  bindto: "#chart",
  render: { mode: canvas() },   // high-density backend
  data: {
    type: scatter(),
    /* thousands of points, still smooth */
  }
});
20chart types
SVG + Canvasrendering
MITlicensed
v4.0.3latest