Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
timelyportfolio committed Feb 5, 2023
1 parent f77d0a0 commit 998a87c
Show file tree
Hide file tree
Showing 7 changed files with 752 additions and 713 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# d3r 1.0.1

* update d3 version [`7.8.2`](https://github.com/d3/d3/releases/tag/v7.8.2) dependency function `d3_dep_v7()`
* fix CRAN test errors

# d3r 1.0.0

* add d3 version [`7.0.0`](https://github.com/d3/d3/releases/tag/v7.0.0) dependency function `d3_dep_v7()`
Expand Down
4 changes: 2 additions & 2 deletions R/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ d3_dep_v7 <- function(offline=TRUE){
if(offline) {
src = c(file=system.file("www/d3/v7/dist", package="d3r"))
} else {
src <- c(href="https://unpkg.com/d3@7.0.0/dist")
src <- c(href="https://unpkg.com/d3@7.8.2/dist")
}

htmltools::htmlDependency(
name = "d3",
version = "7.0.0",
version = "7.8.2",
src = src,
script = "d3.min.js"
)
Expand Down
1,426 changes: 727 additions & 699 deletions inst/www/d3/v7/API.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion inst/www/d3/v7/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

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

D3 now ships as pure ES modules, requiring Node.js 12 or higher. For more, please read [Sindre Sorhus’s FAQ](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
D3 now ships as pure ES modules and requires Node.js 12 or higher. For more, please read [Sindre Sorhus’s FAQ](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).

[d3.bin](https://github.com/d3/d3-array/blob/main/README.md#bin) now ignores nulls. [d3.ascending](https://github.com/d3/d3-array/blob/main/README.md#ascending) and [d3.descending](https://github.com/d3/d3-array/blob/main/README.md#descending) no longer consider null comparable.

[Ordinal scales](https://github.com/d3/d3-scale/blob/main/README.md#ordinal-scales) now use [InternMap](https://github.com/mbostock/internmap) for domains; domain values are now uniqued by coercing to a primitive value via *object*.valueOf instead of coercing to a string via *object*.toString.

Array-likes (*e.g.*, a live NodeList such as *element*.childNodes) are converted to arrays in [d3.selectAll](https://github.com/d3/d3-selection/blob/main/README.md#selectAll) and [*selection*.selectAll](https://github.com/d3/d3-selection/blob/main/README.md#selection_selectAll).

# Changes in D3 6.0

[Released August 26, 2020.](https://github.com/d3/d3/releases/tag/v6.0.0)
Expand Down
2 changes: 1 addition & 1 deletion inst/www/d3/v7/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2010-2021 Mike Bostock
Copyright 2010-2023 Mike Bostock

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
Expand Down
20 changes: 12 additions & 8 deletions inst/www/d3/v7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
## Resources

* [Introduction](https://observablehq.com/@d3/learn-d3)
* [API Reference](https://github.com/d3/d3/blob/master/API.md)
* [API Reference](https://github.com/d3/d3/blob/main/API.md)
* [Releases](https://github.com/d3/d3/releases)
* [Examples](https://observablehq.com/@d3/gallery)
* [Wiki](https://github.com/d3/d3/wiki)

## Installing

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:
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 jsDelivr:

```html
<script type="module">
import * as d3 from "https://cdn.skypack.dev/d3@7";
import * as d3 from "https://cdn.jsdelivr.net/npm/d3@7/+esm";
const div = d3.selectAll("div");
Expand All @@ -42,7 +42,7 @@ You can also use the standalone D3 microlibraries. For example, [d3-selection](h
```html
<script type="module">
import {selectAll} from "https://cdn.skypack.dev/d3-selection@3";
import {selectAll} from "https://cdn.jsdelivr.net/npm/d3-selection@3/+esm";
const div = selectAll("div");
Expand All @@ -61,14 +61,18 @@ Or import everything into a namespace (here, `d3`):
import * as d3 from "d3";
```

In Node:
Or using dynamic import:

```js
const d3 = require("d3");
const d3 = await import("d3");
```

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):
You can also import 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):

```js
const d3 = Object.assign({}, require("d3-format"), require("d3-geo"), require("d3-geo-projection"));
const d3 = await Promise.all([
import("d3-format"),
import("d3-geo"),
import("d3-geo-projection")
]).then(d3 => Object.assign({}, ...d3));
```
4 changes: 2 additions & 2 deletions inst/www/d3/v7/dist/d3.min.js

Large diffs are not rendered by default.

0 comments on commit 998a87c

Please sign in to comment.