Skip to content
mbostock edited this page May 31, 2011 · 151 revisions

Everything in D3 is scoped under the d3 namespace. D3 is broken up into several modules so that you can pick and choose which features you need and minimize the weight. The default build of d3.js includes the core, scale and svg modules, at about 12KB uglified and gzipped. You can edit the Makefile to produce a custom build that suites your needs. D3 does not introduce anything else in the global namespace, with the exception of two polyfills for nonstandard browsers: Date.now and Object.create.

D3 uses semantic versioning. You can find the current version of D3 as d3.version.

d3 (core)

  • d3.xhr - request a resource using XMLHttpRequest.
  • d3.text - request a text file.
  • d3.json - request a JSON blob.
  • d3.html - request an HTML document fragment.
  • d3.xml - request an XML document fragment.

Also see the CSV module.

  • d3.rgb - specify a color in RGB space.
  • rgb.brighter - increase RGB channels by some exponential factor (gamma).
  • rgb.darker - decrease RGB channels by some exponential factor (gamma).
  • rgb.hsl - convert from RGB to HSL.
  • rgb.toString - convert an RGB color to a string.
  • d3.hsl - specify a color in HSL space.
  • hsl.brighter - increase lightness by some exponential factor (gamma).
  • hsl.darker - decrease lightness by some exponential factor (gamma).
  • hsl.rgb - convert from HSL to RGB.
  • hsl.toString - convert an HSL color to a string.

d3.scale

d3.svg

d3.layout

d3.chart

d3.time

d3.behavior

d3.csv

d3.geo

d3.geom

Clone this wiki locally