Skip to content

Commit 32dde9a

Browse files
committed
feat: update to d3 v7
1 parent 633c6e5 commit 32dde9a

8 files changed

Lines changed: 898 additions & 548 deletions

File tree

README.md

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

4040
Download / Include:
4141

42-
- `<script src="https://d3js.org/d3.v6.js" charset="utf-8"></script>`
42+
- `<script src="https://d3js.org/d3.v7.js" charset="utf-8"></script>`
4343
- https://github.com/d3/d3/releases/latest
4444

4545
## Credits

package-lock.json

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

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
},
2323
"homepage": "https://github.com/sgratzl/d3tutorial#readme",
2424
"dependencies": {
25-
"d3": "^6.7.0"
25+
"d3": "^7.0.0"
2626
},
2727
"devDependencies": {
28-
"@types/d3": "^6.7.0",
28+
"@types/d3": "^7.0.0",
2929
"cpx": "^1.5.0",
30-
"http-server": "^0.12.3",
31-
"prettier": "^2.3.0",
30+
"http-server": "^13.0.0",
31+
"prettier": "^2.3.2",
3232
"rimraf": "^3.0.2",
33-
"typescript": "^4.3.2"
33+
"typescript": "^4.3.5"
3434
}
3535
}

web_modules/d3/LICENSE

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
1-
Copyright 2010-2020 Mike Bostock
2-
All rights reserved.
3-
4-
Redistribution and use in source and binary forms, with or without modification,
5-
are permitted provided that the following conditions are met:
6-
7-
* Redistributions of source code must retain the above copyright notice, this
8-
list of conditions and the following disclaimer.
9-
10-
* Redistributions in binary form must reproduce the above copyright notice,
11-
this list of conditions and the following disclaimer in the documentation
12-
and/or other materials provided with the distribution.
13-
14-
* Neither the name of the author nor the names of contributors may be used to
15-
endorse or promote products derived from this software without specific prior
16-
written permission.
17-
18-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1+
Copyright 2010-2021 Mike Bostock
2+
3+
Permission to use, copy, modify, and/or distribute this software for any purpose
4+
with or without fee is hereby granted, provided that the above copyright notice
5+
and this permission notice appear in all copies.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
9+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
11+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
12+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
13+
THIS SOFTWARE.

web_modules/d3/README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,42 @@
1414

1515
## Installing
1616

17-
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:
17+
If you use npm, `npm install d3`. You can also download the [latest release on GitHub](https://github.com/d3/d3/releases/latest). For vanilla HTML in modern browsers, import D3 from Skypack:
1818

1919
```html
20-
<script src="https://d3js.org/d3.v6.js"></script>
20+
<script type="module">
21+
22+
import * as d3 from "https://cdn.skypack.dev/d3@7";
23+
24+
const div = d3.selectAll("div");
25+
26+
</script>
2127
```
2228

23-
For the minified version:
29+
For legacy environments, you can load D3’s UMD bundle from an npm-based CDN such as jsDelivr; a `d3` global is exported:
2430

2531
```html
26-
<script src="https://d3js.org/d3.v6.min.js"></script>
32+
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
33+
<script>
34+
35+
const div = d3.selectAll("div");
36+
37+
</script>
2738
```
2839

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

3142
```html
32-
<script src="https://d3js.org/d3-selection.v2.js"></script>
43+
<script type="module">
44+
45+
import {selectAll} from "https://cdn.skypack.dev/d3-selection@3";
46+
47+
const div = selectAll("div");
48+
49+
</script>
3350
```
3451

35-
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:
52+
D3 is written using [ES2015 modules](http://www.2ality.com/2014/09/es6-modules-final.html). Create a custom bundle using Rollup, Webpack, or your preferred bundler. To import D3 into an ES2015 application, either import specific symbols from specific D3 modules:
3653

3754
```js
3855
import {scaleLinear} from "d3-scale";

0 commit comments

Comments
 (0)