Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

Releases: d3/d3-collection

v1.0.7

24 Aug 21:12
Compare
Choose a tag to compare
  • Housekeeping.

v1.0.6

24 Aug 18:13
Compare
Choose a tag to compare
  • Update dependencies, again.

v1.0.5

24 Aug 17:23
Compare
Choose a tag to compare
  • Update dependencies.

v1.0.4

21 Jun 16:15
Compare
Choose a tag to compare

v1.0.3

10 Mar 18:14
Compare
Choose a tag to compare
  • Update dependencies.

v1.0.2

23 Nov 00:26
Compare
Choose a tag to compare
  • Update dependencies.

v1.0.1

02 Aug 21:54
Compare
Choose a tag to compare
  • Add module entry point to package.json.

v1.0.0

14 Jun 21:17
Compare
Choose a tag to compare
  • First stable release!

Changes since D3 3.x

The d3.set constructor now accepts an existing set for making a copy. If you pass an array to d3.set, you can also pass a value accessor. This accessor takes the standard arguments: the current element (d), the index (i), and the array (data), with this undefined. For example:

var yields = [
  {yield: 22.13333, variety: "Manchuria",        year: 1932, site: "Grand Rapids"},
  {yield: 26.76667, variety: "Peatland",         year: 1932, site: "Grand Rapids"},
  {yield: 28.10000, variety: "No. 462",          year: 1931, site: "Duluth"},
  {yield: 38.50000, variety: "Svansota",         year: 1932, site: "Waseca"},
  {yield: 40.46667, variety: "Svansota",         year: 1931, site: "Crookston"},
  {yield: 36.03333, variety: "Peatland",         year: 1932, site: "Waseca"},
  {yield: 34.46667, variety: "Wisconsin No. 38", year: 1931, site: "Grand Rapids"}
];

var sites = d3.set(yields, function(d) { return d.site; }); // Grand Rapids, Duluth, Waseca, Crookston

The d3.map constructor also follows the standard array accessor argument pattern.

The map.forEach and set.forEach methods have been renamed to map.each and set.each respectively. The order of arguments for map.each has also been changed to value, key and map, while the order of arguments for set.each is now value, value and set. This is closer to ES6 map.forEach and set.forEach. Also like ES6 Map and Set, map.set and set.add now return the current collection (rather than the added value) to facilitate method chaining. New map.clear and set.clear methods can be used to empty collections.

The nest.map method now always returns a d3.map instance. For a plain object, use nest.object instead. When used in conjunction with nest.rollup, nest.entries now returns {key, value} objects for the leaf entries, instead of {key, values}. This makes nest.rollup easier to use in conjunction with hierarchies, as in this Nest Treemap example.

See CHANGES for all D3 changes since 3.x.

v0.3.1

07 Jun 23:43
Compare
Choose a tag to compare
  • Export to the global d3 in vanilla environments (d3/d3#2840).

v0.3.0

07 Jun 23:38
Compare
Choose a tag to compare
  • Export to the global d3 in vanilla environments (d3/d3#2840).