Skip to content

Commit 5665177

Browse files
authored
Merge pull request #66 from d3/two
two
2 parents 92b2733 + a9f680e commit 5665177

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ The axis component renders human-readable reference marks for [scales](https://g
44

55
## Installing
66

7-
If you use NPM, `npm install d3-axis`. Otherwise, download the [latest release](https://github.com/d3/d3-axis/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-axis.v1.min.js) or as part of [D3](https://github.com/d3/d3). (To be useful, you’ll also want to use [d3-scale](https://github.com/d3/d3-scale) and [d3-selection](https://github.com/d3/d3-selection), but these are soft dependencies.) AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:
7+
If you use NPM, `npm install d3-axis`. Otherwise, download the [latest release](https://github.com/d3/d3-axis/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-axis.v2.min.js) or as part of [D3](https://github.com/d3/d3). (To be useful, you’ll also want to use [d3-scale](https://github.com/d3/d3-scale) and [d3-selection](https://github.com/d3/d3-selection), but these are soft dependencies.) AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:
88

99
```html
10-
<script src="https://d3js.org/d3-axis.v1.min.js"></script>
10+
<script src="https://d3js.org/d3-axis.v2.min.js"></script>
1111
<script>
1212
1313
var axis = d3.axisLeft(scale);

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"name": "d3-axis",
3-
"version": "1.0.12",
3+
"version": "2.0.0-rc.1",
4+
"publishConfig": {
5+
"tag": "next"
6+
},
47
"description": "Displays automatic reference lines for scales.",
58
"keywords": [
69
"d3",
@@ -36,7 +39,7 @@
3639
"sideEffects": false,
3740
"devDependencies": {
3841
"d3-scale": "2 - 3",
39-
"d3-selection": "^1.1.0",
42+
"d3-selection": ">=2.0.0-rc.3",
4043
"eslint": "6",
4144
"jsdom": "15",
4245
"rollup": "1",

src/axis.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ function translateY(y) {
1616
}
1717

1818
function number(scale) {
19-
return function(d) {
20-
return +scale(d);
21-
};
19+
return d => +scale(d);
2220
}
2321

2422
function center(scale) {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ d3-interpolate@1:
293293
d3-time "1"
294294
d3-time-format "2"
295295

296-
d3-selection@^1.1.0:
297-
version "1.4.0"
298-
resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.0.tgz#ab9ac1e664cf967ebf1b479cc07e28ce9908c474"
299-
integrity sha512-EYVwBxQGEjLCKF2pJ4+yrErskDnz5v403qvAid96cNdCMr8rmCYfY5RGzWz24mdIbxmDf6/4EAH+K9xperD5jg==
296+
"d3-selection@^1.1.0 - 2":
297+
version "2.0.0-rc.2"
298+
resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-2.0.0-rc.2.tgz#530fffde9fc6007d90c79d39bc4b2777e7288f6e"
299+
integrity sha512-3sXAgCMsIi6zmZFGwgI2fFi9f99vzBRUKZoKOJq8yWDDAci00QgJQfe7xW0VqUW2hItUvGVl61M8WY4Cxg8soQ==
300300

301301
d3-time-format@2:
302302
version "2.1.3"

0 commit comments

Comments
 (0)