Skip to content

Releases: d3/d3-dsv

v1.0.7

01 Sep 13:47
Compare
Choose a tag to compare
  • Fix broken d3 global in vanilla environments. Thanks, @curran! (#29)

v1.0.6

01 Sep 05:51
Compare
Choose a tag to compare
  • Fix parsing when the last field is empty (e.g., foo,bar,).

v1.0.5

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

v1.0.4

01 Mar 00:32
Compare
Choose a tag to compare
  • Fix escaping of strings containing carriage returns. Thanks, @jsedlacek! (#22)

v1.0.3

09 Sep 22:43
Compare
Choose a tag to compare

v1.0.2

09 Sep 03:56
Compare
Choose a tag to compare

v1.0.1

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

v1.0.0

14 Jun 22:49
Compare
Choose a tag to compare
  • First stable release.

Changes since D3 3.x

Pursuant to the great namespace flattening, various CSV and TSV methods have new names:

The d3.csv and d3.tsv methods for loading files of the corresponding formats have not been renamed, however! Those are defined in d3-request.There’s no longer a d3.dsv method, which served the triple purpose of defining a DSV formatter, a DSV parser and a DSV requestor; instead, there’s just d3.dsvFormat which you can use to define a DSV formatter and parser. You can use request.response to make a request and then parse the response body, or just use d3.text.

The dsv.parse method now exposes the column names and their input order as data.columns. For example:

d3.csv("cars.csv", function(error, data) {
  if (error) throw error;
  console.log(data.columns); // ["Year", "Make", "Model", "Length"]
});

You can likewise pass an optional array of column names to dsv.format to format only a subset of columns, or to specify the column order explicitly:

var string = d3.csvFormat(data, ["Year", "Model", "Length"]);

The parser is a bit faster and the formatter is a bit more robust: inputs are coerced to strings before formatting, fixing an obscure crash, and deprecated support for falling back to dsv.formatRows when the input data is an array of arrays has been removed.

See CHANGES for all D3 changes since 3.x.

v0.4.0

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

v0.3.2

22 Mar 20:41
Compare
Choose a tag to compare
  • Fix string coercion during formatting.