Skip to content

Releases: d3/d3

3.0.2

12 Jul 19:12
Compare
Choose a tag to compare

3.0.1

12 Jul 19:09
Compare
Choose a tag to compare

3.0 “Baja”

02 Jul 19:17
Compare
Choose a tag to compare

The page covers new features in 3.0; see Upgrading to 3.0 for how to migrate from 2.x to 3.0.

Geo

Antimeridian Cutting
Three-Axis Rotation
Rotating Winkel-Tripel
Rotating Equirectangular
Clipping
Adaptive Resampling
Canvas Rendering
Satellite & Graticule
Projection Transitions
Choropleth
Raster Reprojection

D3 includes a powerful new geographic projection system! Whereas previous versions of D3 only understood projections as point functions, D3 3.0 models projections as full geometry transformations. Thus, when straight lines are projected to curves, D3 applies configurable adaptive resampling to subdivide lines and eliminate projection artifacts; see for example the smooth appearance of Antarctica in the Larrivée and Van der Grinten projections. When lines or polygons cross the antimeridian, D3 cuts the geometry, rather than relying on pre-cut shapefiles. All projections now support small circle clipping and three-axis rotation.

Under the hood, D3 uses streaming geometry transformations (d3.geo.stream) that reduce memory by avoiding temporary objects. This design also enables direct-to-canvas rendering with dramatic performance improvements! Streams are used to compute projected area, centroid and bounds consistent with displayed geometry, and can even filter geometry for scale-dependent shape simplification.

The d3.geo package includes a number of useful new components, such as a graticule for displaying grid lines and sphere rendering for globe outlines. The d3.geo.circle class now supports small and great circle rendering, so you can approximate Tissot's indicatrix. A new d3.geo.interpolate simplifies interpolation of spherical coordinates along great arcs, and there are even new functions for accurately computing spherical area, centroid and bounds.

Plugins

Peirce Quincuncial
Wagner VI
Equidistant Conic
Mollweide
Sinu-Mollweide
Goode Homolosine
Van der Grinten
d3.hexbin
d3.geo.tile
TopoJSON
Map Coloring
Smooth Zooming

The extended geographic projections plugin brings the number of supported projections to over 40! You can also compose new custom projections using d3.geo.projection and d3.geo.projectionMutator. The d3.geo.tile plugin makes it easy to drop-in 256x256 raster tiles into your map visualization. In conjunction with d3.behavior.zoom, you can quickly create slippy maps. The d3.hexbin and d3.interpolateZoom plugins are also useful for mapping.

TopoJSON is an extension to GeoJSON that typically provides 80-90% smaller file sizes. It also encodes topology, enabling topology-preserving shape simplification (à la MapShaper), map coloring, cartograms, boundary mesh computation, and more! TopoJSON is not a D3 plugin per se, but simply a standalone JavaScript library for converting TopoJSON to GeoJSON; a future release of d3.geo may add native TopoJSON support.

Transitions

Chained Transitions, I
Chained Transitions, II
Chained Transitions, III
Chained Transitions, IV
Transition Reselection, I
Transition Reselection, II

D3’s transitions now bind tweens and other transition state to the DOM, similar to how data is bound to selections. This means you can now reselect scheduled transitions from the DOM and modify them, say for customized axes. You can also inspect them in the JavaScript console for easier debugging.

To make transitions easier to use, value functions are now evaluated immediately by transition.attr and transition.style, rather than waiting until the transition starts. This greatly simplifies chained transitions that depend on external state, such as scale domains. The transition.transition method now creates a transition that starts when the previous transition ends (rather than a concurrent transition), so you can chain transitions without listening for "end" events.

For more on how transitions work in D3, see the Working with Transitions tutorial, and the section on transitions in Upgrading to 3.0.

Requests

Progress Events
Read more

2.10.0

17 Jul 00:24
Compare
Choose a tag to compare

2.9.0

17 Jul 00:24
Compare
Choose a tag to compare
  • Add defined methods to d3.svg.line and d3.svg.area.

2.8.0

17 Jul 00:25
Compare
Choose a tag to compare
  • Add selection.datum (deprecating selection.map), which is like selection.data but doesn't compute a data-join; it can be used to get or set the data bound to elements.
  • Brush component can now take decorative resizers.
  • Add d3.map class (similar to ES6's map collection) for easier management of string-value maps; this is used internally by transitions, event listeners, the nest operator, and many other components.
  • Add d3.bisector for bisecting sorted arrays with an accessor.
  • Expose d3.selection.enter.prototype.
  • Generalize d3.svg.mouse to support HTML elements, and renamed to d3.mouse.
  • Add d3.scale.identity.
  • Add axis.tickValues.
  • Rewrite d3.behavior.zoom.
  • Add "start" and "end" events to force layout, along with force.tick and force.alpha for synchronous execution.
  • Add a variety of new time interval methods.

2.7.0

17 Jul 00:25
Compare
Choose a tag to compare
  • The selection.filter method can now take a selector, such as filter(".foo").
  • Add selection.order: reorders document elements to match selection order; this is faster than selection.sort if your data is already in-order.

2.6.0

17 Jul 00:26
Compare
Choose a tag to compare
  • Namespaces for selection.append and selection.insert now optional (in most cases)!
  • Ordinal scale support for axes and brushes.
  • Drag behavior supports configurable origin.
  • Dispatchers can be used to access current listeners.

2.5.0

17 Jul 00:26
Compare
Choose a tag to compare
  • Add d3.svg.brush.
  • 2D transform transitions.
  • Namespaced events for d3.dispatch.
  • Extended ISO 8601.
  • Extents for zoom behavior.
  • Array extents.

2.4.0

17 Jul 00:26
Compare
Choose a tag to compare
  • SI-prefix ("r") format.
  • Multiple classes for the classed operator.
  • Mean and median.