MCPcopy Index your code
hub / github.com/naver/billboard.js

github.com/naver/billboard.js @4.0.1 sqlite

repository ↗ · DeepWiki ↗ · release 4.0.1 ↗
2,010 symbols 5,723 edges 350 files 951 documented · 47% 1 cross-repo links
README

billboard.js

Latest Version Next version bb

semantic-release React

download download jsDelivr jsDelivr

CI Status [Coverage Status]link-coverage [Known Vulnerabilities]link-snyk [gzip size]link-gzip-size

billboard.js is a re-usable, easy interface JavaScript chart library, based on D3.js.

The name "billboard" comes from the famous billboard chart which everybody knows.

Documents

Questions?

If you have any questions, check out the previous posts or create a new one at: - Stack Overflow: billboard.js tagged posts - Issue with 'question' label

Supported chart types

[!NOTE] v4 adds an opt-in canvas rendering mode for high-density axis charts. See the Canvas rendering mode notes for supported chart types, ESM import usage, interactions and SVG parity scope.

Download and Installation

Download dist files from the repo directly or install it via npm.

Dist file list from the repo. (click to expand)

For development (Uncompressed)

You can download the uncompressed files for development

Latest

  • https://naver.github.io/billboard.js/release/latest/dist/billboard.js
  • https://naver.github.io/billboard.js/release/latest/dist/billboard.css

Specific version

  • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.js
  • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.css

For production (Compressed)

You can download the compressed files for production

Latest

  • https://naver.github.io/billboard.js/release/latest/dist/billboard.min.js
  • https://naver.github.io/billboard.js/release/latest/dist/billboard.min.css

Specific version

  • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.min.js
  • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.min.css

Packaged version (with D3.js inclusion)

⚠️ Packaged version is not an official distribution. It's to provide an easy way to load 'billboard.js' with dependencies.

  • Latest
    • https://naver.github.io/billboard.js/release/latest/dist/billboard.pkgd.js
    • https://naver.github.io/billboard.js/release/latest/dist/billboard.pkgd.min.js
  • Specific version
    • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.pkgd.js
    • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.pkgd.min.js

Themes

[!NOTE] If you want to apply themes, simply load one of the theme css files provided instead of the default css file. - Screenshot Preview

Dist theme file list from the repo. (click to expand)

datalab

  • https://naver.github.io/billboard.js/release/latest/dist/theme/datalab.css
  • https://naver.github.io/billboard.js/release/latest/dist/theme/datalab.min.css

dark

  • https://naver.github.io/billboard.js/release/latest/dist/theme/dark.css
  • https://naver.github.io/billboard.js/release/latest/dist/theme/dark.min.css

insight

  • https://naver.github.io/billboard.js/release/latest/dist/theme/insight.css
  • https://naver.github.io/billboard.js/release/latest/dist/theme/insight.min.css

graph

  • https://naver.github.io/billboard.js/release/latest/dist/theme/graph.css
  • https://naver.github.io/billboard.js/release/latest/dist/theme/graph.min.css

modern

  • https://naver.github.io/billboard.js/release/latest/dist/theme/modern.css
  • https://naver.github.io/billboard.js/release/latest/dist/theme/modern.min.css

Nightly version

Nightly version is the latest build from the master branch. With nightly, you can try upcoming changes prior to the official release.

  • https://github.com/naver/billboard.js/tree/nightly/dist

[!NOTE] The version info will be given as the build datetime: x.x.x-nightly-yyyymmddhhmmss

There are two ways to install from the nightly branch directly.

// Specify on 'package.json' file
"dependencies": {
      ...
      "billboard.js": "naver/billboard.js#nightly"
},
# Run install command from shell
$ npm install git+https://github.com/naver/billboard.js.git#nightly --save

Next (Release Candidate) version

Next version is the 'release candidate' build, prior to the latest official release.

# Run install command from shell
$ npm install billboard.js@next --save

Installation with npm

$ npm install billboard.js

Packages

Name For Description
bb React React component for billboard.js

Using CDN

If you want to use 'billboard.js' without installation, load files directly from one of the CDN providers.

  • cdnjs: https://cdnjs.com/libraries/billboard.js
  • jsDelivr: https://cdn.jsdelivr.net/npm/billboard.js/dist/
  • unpkg: https://unpkg.com/billboard.js/dist/

Supported Browsers

[!IMPORTANT] - Basically will work on all SVG and ES6+ supported browsers. - Canvas rendering mode additionally requires browser Canvas 2D API support. - *Notes for legacy browsers: - Recommended to use the packaged build or construct your own build following How to bundle for legacy browsers? instructions. - D3.js has dropped support for legacy browsers since v6. - Support isn't fully guaranteed.

Dependency by version

D3.js (required) billboard.js
4.x ~ 5.x 1.x ~ 2.x
6.x+ 3.x+

Getting Started

Load billboard.js after D3.js.



    <script src="https://d3js.org/d3.v6.min.js"></script>


    <link rel="stylesheet" href="https://github.com/naver/billboard.js/raw/4.0.1/$YOUR_PATH/billboard.css">
    <script src="https://github.com/naver/billboard.js/raw/4.0.1/$YOUR_PATH/billboard.js"></script>


    <link rel="stylesheet" href="https://github.com/naver/billboard.js/raw/4.0.1/$YOUR_PATH/billboard.css">
    <script src="https://github.com/naver/billboard.js/raw/4.0.1/$YOUR_PATH/billboard.pkgd.js"></script>

or by importing ESM.

[!TIP] 📌 Also check: How to load as ESM directly from the browser?

// 1) import billboard.js
// as named import with desired shapes and interaction modules
// https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality
import {bb, area, bar, zoom} from "billboard.js";

// or as importing default
import bb, {area, bar, zoom} from "billboard.js";

// 2) import css if your dev-env supports. If don't, include them via <link>
import "billboard.js/dist/billboard.css";

// or theme style. Find more themes from 'theme' folder
import "billboard.js/dist/theme/insight.css"

For canvas rendering mode, import from the /canvas ESM entry and set render.mode with canvas().

import bb, {bar, canvas} from "billboard.js/canvas";

bb.generate({
  render: {
    mode: canvas()
  },
  data: {
    columns: [
      ["data1", 30, 200, 100, 400]
    ],
    type: bar()
  }
});

[!NOTE] - For migration from C3.js, check out the migration guide. - If you have an issue bundling for legacy browsers, check out "How to bundle for legacy browsers?".

Basic usage example

1) Create chart holder element






2) Generate a chart with options

// generate the chart
var chart = bb.generate({
    bindto: "#chart",
    data: {
      // for ESM import usage, import 'line' module and execute it as
      // type: line(),
      type: "line",
      columns: [
          ["data1", 30, 200, 100, 400, 150, 250]
      ]
    },
    zoom: {
      // for ESM import usage, import 'zoom' module and execute it as
      // enabled: zoom()
      enabled: true
    }
});

// call some API
chart.load( ... );

License

billboard.js is released under the MIT license.

Copyright (c) 2017 ~ present NAVER Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fnaver%2Fbillboard.js.svg?type=l

Extension points exported contracts — how you extend this code

HSLColor (Interface)
* HSL color object compatible with d3-interpolate
src/Plugin/stanford/index.ts
ICandlestickData (Interface)
* Parsed candlestick OHLC data. * @private
src/ChartInternal/shape/core/candlestick.ts
GridOperations (Interface)
(no doc) [1 implementers]
types/chart.d.ts
IProp (Interface)
(no doc)
packages/react/src/index.tsx
Axis (Interface)
(no doc)
types/axis.d.ts
CanvasThemeSelectorStyle (Interface)
(no doc)
types/options.d.ts
LabelLineOptions (Interface)
(no doc)
types/options.shape.d.ts
TargetIds (Interface)
(no doc)
types/types.d.ts

Core symbols most depended-on inside this repo

select
called by 741
types/chart.d.ts
text
called by 186
src/canvas/CanvasPainter.ts
show
called by 154
types/chart.d.ts
remove
called by 152
types/chart.d.ts
sanitize
called by 146
src/module/sanitize.ts
generateWithOptions
called by 144
test/esm/canvas-spec.ts
load
called by 133
types/chart.d.ts
line
called by 118
src/config/resolver/canvasShape.ts

Shape

Function 1,502
Method 353
Class 80
Interface 75

Languages

TypeScript100%

Modules by API surface

src/config/resolver/canvas.ts121 symbols
src/ChartInternal/data/data.ts83 symbols
src/canvas/CanvasRenderer.ts68 symbols
src/ChartInternal/Axis/Axis.ts64 symbols
src/canvas/CanvasAxisRenderer.ts55 symbols
src/ChartInternal/shape/arc.ts49 symbols
src/canvas/axisTicks.ts44 symbols
types/options.d.ts39 symbols
src/ChartInternal/shape/shape.ts36 symbols
test/esm/canvas-spec.ts33 symbols
src/ChartInternal/internals/type.ts32 symbols
src/ChartInternal/internals/legend.ts32 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@babel/core7.25.2 · 1×
@commitlint/cli20.5.0 · 1×
@commitlint/config-conventional20.5.0 · 1×
@eslint/js10.0.1 · 1×
@playwright/test1.59.1 · 1×
@rollup/plugin-node-resolve16.0.3 · 1×
@rollup/plugin-replace6.0.3 · 1×
@rollup/plugin-typescript12.3.0 · 1×
@semantic-release/changelog6.0.3 · 1×
@semantic-release/commit-analyzer13.0.1 · 1×
@semantic-release/exec7.1.0 · 1×
@semantic-release/git10.0.1 · 1×

For agents

$ claude mcp add billboard.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact