Releases: d3/d3
3.1.3
- Fix d3.geo.mercator such that the clip extent is determined automatically by default.
3.1.2
3.1.1
- Fix projection.clipExtent for very large coordinates (e.g., satellite projection).
3.1 “Svalbard”
Geo
- Major and minor step to graticule. Default graticule step is now 10°.
- Add d3.geo.distance; deprecate d3.geo.greatArc.
- Add d3.geo.length.
- Add d3.geo.albersUsa invert.
- Add d3.geo.rotation.
- Add d3.geo.projection clipExtent for viewport clipping.
- Add d3.geo.transverseMercator. Useful for state plane projections, for example.
- Add d3.geo.conicConformal, conicEquidistant, conicEqualArea.
Mercator Projection
The Mercator projection now uses viewport clipping rather than clamping latitudes. The viewport is automatically determined by the projection’s scale and translate, but can be set explicitly using projection.clipExtent. Note that only d3.geo.mercator uses viewport clipping; d3.geo.mercator.raw does no clipping or clamping.
D3 3.1 changes the scale of d3.geo.mercator, increasing the effective scale factor by 2π. When upgrading to 3.1, divide your previous scale by 2π when setting, or multiply by 2π when getting. See the d3.geo.tile example for sample usage.
Selections
- Add selection.on("mouseenter") and selection.on("mouseleave") polyfill; see mouseenter vs. mouseover example.
- Add selection.on(".name", null).
- Add selection.insert(name, function).
- Fix for selection.classed in Safari 5.
Scales and Data
- Allow row conversion for d3.csv.parse and d3.tsv.parse.
- Add d3.csv.format and d3.tsv.format.
- Add d3.set.
- Allow d3.map to be used with d3.nest.
- Add d3.scale.log base.
- Add optional format specifier for d3.scale.{linear,pow,sqrt,identity} tickFormat.
Geometry
- Add accessors for d3.geom.{voronoi,quadtree,hull}.
- Add d3.geom.voronoi links, triangles; deprecate d3.geom.delaunay.
And one more thing…
Thanks to SMASH, you can now build a minimal version of D3 that has just the parts you need, reducing the size of your JavaScript assets. For example, if you need d3.geo.mercator and d3.geo.path to render some stuff to Canvas, you could build a minimal bundle that’s only 24K:
smash src/start.js src/geo/path.js src/geo/mercator.js src/end.js > lib.js
See the SMASH wiki for a more detailed example including an example Makefile.
3.0.8
- Fix d3.time.format.iso for Safari 5.
3.0.7
- Fix d3.geo.interpolate for coincident points.
- Improve accuracy of d3.geo.interpolate for small distances using the haversine formula.
- Fix polygon rendering when using projection.clipAngle or projection.clipExtent and multiple points are coincident with the clip boundary.
- Fix d3.rebind such that it returns the target object if the rebound source method returns the source object, rather than checking argument length.
3.0.6
- Fix d3.svg.axis such that: the “tick” class is applied to the g element, rather than the line; the domain path is properly entered when called via transition; and an invalid orientation is treated as "bottom".
- Fix selection.sort such that null nodes are placed at the end, rather than passing undefined to the comparator.
- Fix force.linkDistance and force.linkStrength such that they return a constant value if the link distance or strength is specified as a constant value, rather than returning a function; fix force.drag such that a drag behavior is properly instantiated when called with no arguments, and any additional set
fixed
bits are preserved on mouseup or mouseout. - Fix d3.geom.voronoi to workaround Prototype’s broken implementation of array.filter.
- Fix d3.format and d3.formatPrefix to use MICRO SIGN (µ) rather than GREEK SMALL LETTER MU (μ), and fix the rounding specifiers "p" and "r".
- Fix d3.behavior.zoom’s detection of wheel event support, and increase speed for browsers that do not support wheel events.
- Optimize d3.random.logNormal.
- Optimize d3.geo.area.
- Capture references to the
d3
namespace, the current document and the current window, rather than rely on globals; allows multiple versions of D3 to be loaded independently.
3.0.5
3.0.4
3.0.3
- Fix selection.data when duplicate keys are specified; only the first datum or element is considered and subsequent data or elements are ignored.
- Allow projection to return null if the specified location is clipped.
- Fix localization when building on Linux.