Changelog History
Page 3
-
v5.9.6 Changes
June 28, 2019- Account for rounding when determining whether a color is displayable.
-
v5.9.5 Changes
June 27, 2019- Implement chroma clamping in hcl.toString.
- ๐ Fix achromatic representation of white in d3.hcl (again).
-
v5.9.4 Changes
June 26, 2019- ๐ Fix achromatic representation of black and white in d3.hcl.
-
v5.9.3 Changes
June 26, 2019- ๐ Fix d3.stackDivergingOffset when there is only one series.
- ๐ Fix achromatic representation of black and white in d3.hcl.
- ๐ Fix d3.geoContains for LineStrings. Thanks, @ondras!
- ๐ Fix d3.geoContains for longitudes outside of ยฑ180ยฐ.
- ๐ Fix d3.geoBounds for sphers.
-
v5.9.2 Changes
March 14, 2019- ๐ Fix bug when initializing nodes with fixed positions in force simulations.
-
v5.9.1 Changes
February 10, 2019- Fix corruption when quadtree.cover is coincident with the current extent.
- Favor a more concise ISO 8601 format for dates in dsv.format and dsv.formatRows.
-
v5.9.0 Changes
February 07, 2019d3-dsv
- โ Add d3.autoType for automatic type inference when parsing!
- Add dsv.formatBody, d3.csvFormatBody, and d3.tsvFormatBody.
- In dsv.format and dsv.formatRows, use date.toISOString to format dates.
-
v5.8.2 Changes
February 05, 2019- ๐ Fix d3.timeMinute and d3.timeHour for historical times.
-
v5.8.1 Changes
February 04, 2019- Fix rendering glitch with arc.cornerRadius.
-
v5.0 Changes
๐ This document covers only major changes. For minor and patch changes, please see the release notes.
D3 5.0 introduces only a few non-backwards-compatible changes.
๐ D3 now uses Promises instead of asynchronous callbacks to load data. Promises simplify the structure of asynchronous code, especially in modern browsers that support async and await. (See this introduction to promises on Observable.) For example, to load a CSV file in v4, you might say:
d3.csv("file.csv", function(error, data) { if (error) throw error; console.log(data); });
In v5, using promises:
d3.csv("file.csv").then(function(data) { console.log(data); });
Note that you donโt need to rethrow the errorโthe promise will reject automatically, and you can promise.catch if desired. Using await, the code is even simpler:
const data = await d3.csv("file.csv"); console.log(data);
๐ With the adoption of promises, D3 now uses the Fetch API instead of XMLHttpRequest: the d3-request module has been replaced by d3-fetch. Fetch supports many powerful new features, such as streaming responses. D3 5.0 also deprecates and removes the d3-queue module. Use Promise.all to run a batch of asynchronous tasks in parallel, or a helper library such as p-queue to control concurrency.
D3 no longer provides the d3.schemeCategory20* categorical color schemes. These twenty-color schemes were flawed because their grouped design could falsely imply relationships in the data: a shared hue can imply that the encoded data are part of a group (a super-category), while relative lightness can imply order. Instead, D3 now includes d3-scale-chromatic, which implements excellent schemes from ColorBrewer, including categorical, diverging, sequential single-hue and sequential multi-hue schemes. These schemes are available in both discrete and continuous variants.
D3 now provides implementations of marching squares and density estimation via d3-contour! There are two new d3-selection methods: selection.clone for inserting clones of the selected nodes, and d3.create for creating detached elements. Geographic projections now support projection.angle, which has enabled several fantastic new polyhedral projections by Philippe Riviรจre.
๐ฆ Lastly, D3โs package.json no longer pins exact versions of the dependent D3 modules. This fixes an issue with duplicate installs of D3 modules.