Skip to content

Commit

Permalink
Merge pull request #66 from d3/two
Browse files Browse the repository at this point in the history
two
  • Loading branch information
Fil committed Aug 23, 2020
2 parents 92b2733 + a9f680e commit 5665177
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -4,10 +4,10 @@ The axis component renders human-readable reference marks for [scales](https://g

## Installing

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

```html
<script src="https://d3js.org/d3-axis.v1.min.js"></script>
<script src="https://d3js.org/d3-axis.v2.min.js"></script>
<script>
var axis = d3.axisLeft(scale);
Expand Down
7 changes: 5 additions & 2 deletions package.json
@@ -1,6 +1,9 @@
{
"name": "d3-axis",
"version": "1.0.12",
"version": "2.0.0-rc.1",
"publishConfig": {
"tag": "next"
},
"description": "Displays automatic reference lines for scales.",
"keywords": [
"d3",
Expand Down Expand Up @@ -36,7 +39,7 @@
"sideEffects": false,
"devDependencies": {
"d3-scale": "2 - 3",
"d3-selection": "^1.1.0",
"d3-selection": ">=2.0.0-rc.3",
"eslint": "6",
"jsdom": "15",
"rollup": "1",
Expand Down
4 changes: 1 addition & 3 deletions src/axis.js
Expand Up @@ -16,9 +16,7 @@ function translateY(y) {
}

function number(scale) {
return function(d) {
return +scale(d);
};
return d => +scale(d);
}

function center(scale) {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -293,10 +293,10 @@ d3-interpolate@1:
d3-time "1"
d3-time-format "2"

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

d3-time-format@2:
version "2.1.3"
Expand Down

0 comments on commit 5665177

Please sign in to comment.