Skip to content

Commit 7fabb1f

Browse files
committed
update dependencies
1 parent 10fbe8c commit 7fabb1f

11 files changed

Lines changed: 11655 additions & 11116 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ License: BSD-3-Clause license
3131

3232
Download / Include:
3333

34-
- `<script src="https://d3js.org/d3.v5.js" charset="utf-8"></script>`
34+
- `<script src="https://d3js.org/d3.v6.js" charset="utf-8"></script>`
3535
- https://github.com/d3/d3/releases/latest
3636

3737
## Credits

package-lock.json

Lines changed: 97 additions & 449 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"main": "index.js",
77
"scripts": {
88
"start": "http-server",
9-
"postinstall": "rm -rf web_modules/d3 && cp -r node_modules/d3 web_modules/ && npm run compile",
9+
"postinstall": "shx rm -rf web_modules/d3 && shx cp -r node_modules/d3 web_modules/ && npm run compile",
1010
"compile": "tsc -p .",
1111
"watch": "tsc -w -p .",
1212
"format": "prettier --print-width 120 --write \"examples/*.(html|ts|css|json)\" index.html README.md package.json"
@@ -22,12 +22,13 @@
2222
},
2323
"homepage": "https://github.com/sgratzl/d3tutorial#readme",
2424
"dependencies": {
25-
"d3": "^5.15.1"
25+
"d3": "^6.0.0"
2626
},
2727
"devDependencies": {
2828
"@types/d3": "^5.7.2",
29-
"http-server": "^0.12.1",
30-
"prettier": "^2.0.4",
31-
"typescript": "^3.8.3"
29+
"http-server": "^0.12.3",
30+
"prettier": "^2.1.1",
31+
"shx": "^0.3.2",
32+
"typescript": "^4.0.2"
3233
}
3334
}

web_modules/d3/CHANGES.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,60 @@
1-
# Changes in D3 5.0
1+
# Changes in D3 6.0
22

3-
[Released March 22, 2018.](https://github.com/d3/d3/releases/tag/v5.0.0)
3+
[Released August 26, 2020.](https://github.com/d3/d3/releases/tag/v6.0.0)
44

55
*This document covers only major changes. For minor and patch changes, please see the [release notes](https://github.com/d3/d3/releases).*
66

7+
D3 6.0 introduces several non-backwards-compatible changes.
8+
9+
**Adoption of ES2015**
10+
11+
* *All* the D3 modules have now adopted ES2015. Developers who need to maintain compatibility with older browsers will use transpilation. [[details](https://observablehq.com/d/f91cccf0cad5e9cb#es2015)]
12+
13+
**d3-selection** has a new event manager:
14+
15+
* d3.event ⇨ (event) passed as the first argument to all listeners [[details](https://observablehq.com/d/f91cccf0cad5e9cb#events)]
16+
* d3.mouse, d3.touch, d3.touches, d3.clientPoint ⇨ d3.pointer [[details](https://observablehq.com/d/f91cccf0cad5e9cb#pointer)]
17+
18+
**d3-brush**, **d3-drag** and **d3-zoom** also use the new event manager:
19+
20+
* *brush*.on listeners now receive event [[details](https://observablehq.com/d/f91cccf0cad5e9cb#event_brush)]
21+
* *drag*.on listeners now receive event [[details](https://observablehq.com/d/f91cccf0cad5e9cb#event_drag)]
22+
* *zoom*.on listeners now receive event [[details](https://observablehq.com/d/f91cccf0cad5e9cb#event_zoom)]
23+
24+
**d3-voronoi** is deprecated, and replaced by [d3-delaunay](https://github.com/d3/d3-delaunay):
25+
26+
* d3.voronoi ⇨ d3.Delaunay [[details](https://observablehq.com/d/f91cccf0cad5e9cb#delaunay)]
27+
28+
**d3-collection** is deprecated, and its methods are replaced:
29+
30+
* d3.nest ⇨ d3.group and d3.rollup (from d3-array) [[details](https://observablehq.com/d/f91cccf0cad5e9cb#group)]
31+
* d3.map ⇨ Map [[details](https://observablehq.com/d/f91cccf0cad5e9cb#collection)]
32+
* d3.set ⇨ Set [[details](https://observablehq.com/d/f91cccf0cad5e9cb#collection)]
33+
* d3.keys ⇨ Object.keys [[details](https://observablehq.com/d/f91cccf0cad5e9cb#collection)]
34+
* d3.values ⇨ Object.values [[details](https://observablehq.com/d/f91cccf0cad5e9cb#collection)]
35+
* d3.entries ⇨ Object.entries [[details](https://observablehq.com/d/f91cccf0cad5e9cb#collection)]
36+
37+
**d3-array** has renamed two methods:
38+
* d3.histogram ⇨ d3.bin [[details](https://observablehq.com/d/f91cccf0cad5e9cb#bin)]
39+
* d3.scan ⇨ d3.leastIndex [[details](https://observablehq.com/d/f91cccf0cad5e9cb#leastIndex)]
40+
41+
**d3-interpolate** has a breaking change in an ancillary method:
42+
* d3.interpolateTransformCss is now stricter in its inputs. [[details](https://observablehq.com/d/f91cccf0cad5e9cb#interpolateTransformCss)]
43+
44+
**d3-format** changes its minus sign:
45+
* The default symbol for the sign of negative values becomes unicode minus instead of hyphen-minus. [[details](https://observablehq.com/d/f91cccf0cad5e9cb#minus)]
46+
47+
**bower**
48+
49+
Support for the [bower](https://github.com/mbostock-bower/d3-bower) package manager has been dropped; use [unpkg](https://unpkg.com/d3) or [cdnjs](https://cdnjs.com/libraries/d3).
50+
51+
………
52+
53+
54+
# Changes in D3 5.0
55+
56+
[Released March 22, 2018.](https://github.com/d3/d3/releases/tag/v5.0.0)
57+
758
D3 5.0 introduces only a few non-backwards-compatible changes.
859

960
D3 now uses [Promises](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises) instead of asynchronous callbacks to load data. Promises simplify the structure of asynchronous code, especially in modern browsers that support [async and await](https://javascript.info/async-await). (See this [introduction to promises](https://observablehq.com/@observablehq/introduction-to-promises) on [Observable](https://observablehq.com).) For example, to load a CSV file in v4, you might say:

web_modules/d3/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
If you use npm, `npm install d3`. Otherwise, download the [latest release](https://github.com/d3/d3/releases/latest). The released bundle supports anonymous AMD, CommonJS, and vanilla environments. You can load directly from [d3js.org](https://d3js.org), [CDNJS](https://cdnjs.com/libraries/d3), or [unpkg](https://unpkg.com/d3/). For example:
1818

1919
```html
20-
<script src="https://d3js.org/d3.v5.js"></script>
20+
<script src="https://d3js.org/d3.v6.js"></script>
2121
```
2222

2323
For the minified version:
2424

2525
```html
26-
<script src="https://d3js.org/d3.v5.min.js"></script>
26+
<script src="https://d3js.org/d3.v6.min.js"></script>
2727
```
2828

2929
You can also use the standalone D3 microlibraries. For example, [d3-selection](https://github.com/d3/d3-selection):
3030

3131
```html
32-
<script src="https://d3js.org/d3-selection.v1.js"></script>
32+
<script src="https://d3js.org/d3-selection.v2.js"></script>
3333
```
3434

3535
D3 is written using [ES2015 modules](http://www.2ality.com/2014/09/es6-modules-final.html). Create a [custom bundle using Rollup](https://bl.ocks.org/mbostock/bb09af4c39c79cffcde4), Webpack, or your preferred bundler. To import D3 into an ES2015 application, either import specific symbols from specific D3 modules:
@@ -47,11 +47,11 @@ import * as d3 from "d3";
4747
In Node:
4848

4949
```js
50-
var d3 = require("d3");
50+
const d3 = require("d3");
5151
```
5252

5353
You can also require individual modules and combine them into a `d3` object using [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign):
5454

5555
```js
56-
var d3 = Object.assign({}, require("d3-format"), require("d3-geo"), require("d3-geo-projection"));
56+
const d3 = Object.assign({}, require("d3-format"), require("d3-geo"), require("d3-geo-projection"));
5757
```

0 commit comments

Comments
 (0)