Skip to content

Commit

Permalink
Fix #6 - upgrade to d3-scale 0.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Apr 29, 2016
1 parent e892f90 commit ebb2c20
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion README.md
Expand Up @@ -14,7 +14,7 @@ If you use NPM, `npm install d3-axis`. Otherwise, download the [latest release](
<script src="https://d3js.org/d3-interpolate.v0.5.min.js"></script>
<script src="https://d3js.org/d3-time.v0.2.min.js"></script>
<script src="https://d3js.org/d3-time-format.v0.3.min.js"></script>
<script src="https://d3js.org/d3-scale.v0.6.min.js"></script>
<script src="https://d3js.org/d3-scale.v0.7.min.js"></script>
<script src="https://d3js.org/d3-selection.v0.7.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v0.4.min.js"></script>
<script src="https://d3js.org/d3-ease.v0.7.min.js"></script>
Expand Down Expand Up @@ -109,6 +109,14 @@ See [d3-format](https://github.com/d3/d3-format) and [d3-time-format](https://gi
axis.tickFormat(d3.format(",.0f"));
```

More commonly, a format specifier is passed to [*axis*.ticks](#axis_ticks):

```js
axis.ticks(10, ",f");
```

This has the advantage of setting the format precision automatically based on the tick interval.

<a name="axis_tickSize" href="#axis_tickSize">#</a> <i>axis</i>.<b>tickSize</b>([<i>size</i>])

If *size* is specified, sets the [inner](#axis_tickSizeInner) and [outer](#axis_tickSizeOuter) tick size to the specified value and returns the axis. If *size* is not specified, returns the current inner tick size, which defaults to 6.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -27,13 +27,13 @@
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-axis.js ../d3.github.com/d3-axis.v0.3.js && cp build/d3-axis.min.js ../d3.github.com/d3-axis.v0.3.min.js && cd ../d3.github.com && git add d3-axis.v0.3.js d3-axis.v0.3.min.js && git commit -m \"d3-axis ${VERSION}\" && git push && cd - && zip -j build/d3-axis.zip -- LICENSE README.md build/d3-axis.js build/d3-axis.min.js"
},
"dependencies": {
"d3-scale": "~0.6.0",
"d3-scale": "~0.7.0",
"d3-selection": "~0.7.0",
"d3-transition": "~0.2.0"
},
"devDependencies": {
"json2module": "0.0",
"rollup": "0.25",
"rollup": "0.26",
"tape": "4",
"uglify-js": "2"
}
Expand Down

0 comments on commit ebb2c20

Please sign in to comment.