-
Notifications
You must be signed in to change notification settings - Fork 4
Wiki ▸ Release Notes ▸ 3.1
- 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.
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.
- 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.
- 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.
- Add accessors for d3.geom.{voronoi,quadtree,hull}.
- Add d3.geom.voronoi links, triangles; deprecate d3.geom.delaunay.
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.