Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: d3/d3-scale
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 89703fb51dce843a5d0adf2f2c59ff13cb0dcaea
Choose a base ref
...
head repository: d3/d3-scale
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f7cb35bdc6264b334922522277a3dd525ef031d0
Choose a head ref
Loading
Showing with 4,613 additions and 4,024 deletions.
  1. +1 −3 .eslintrc.json
  2. +18 −0 .github/eslint.json
  3. +30 −0 .github/workflows/node.js.yml
  4. +0 −4 .npmignore
  5. +13 −27 LICENSE
  6. +240 −189 README.md
  7. +0 −17 d3-scale.sublime-project
  8. +38 −27 package.json
  9. +9 −1 rollup.config.js
  10. +0 −4 src/array.js
  11. +10 −9 src/band.js
  12. +1 −1 src/colors.js
  13. +1 −1 src/constant.js
  14. +14 −13 src/continuous.js
  15. +23 −10 src/diverging.js
  16. +5 −6 src/identity.js
  17. +20 −16 src/index.js
  18. +11 −2 src/init.js
  19. +28 −30 src/linear.js
  20. +7 −6 src/log.js
  21. +1 −1 src/nice.js
  22. +1 −1 src/number.js
  23. +14 −13 src/ordinal.js
  24. +3 −3 src/pow.js
  25. +5 −6 src/quantile.js
  26. +5 −6 src/quantize.js
  27. +63 −0 src/radial.js
  28. +20 −8 src/sequential.js
  29. +13 −5 src/sequentialQuantile.js
  30. +3 −3 src/symlog.js
  31. +4 −5 src/threshold.js
  32. +1 −1 src/tickFormat.js
  33. +16 −80 src/time.js
  34. +5 −5 src/utcTime.js
  35. +13 −0 test/.eslintrc.json
  36. +28 −0 test/asserts.js
  37. +179 −184 test/band-test.js
  38. +6 −6 test/date.js
  39. +143 −99 test/diverging-test.js
  40. +148 −148 test/identity-test.js
  41. +0 −10 test/inDelta.js
  42. +416 −429 test/linear-test.js
  43. +279 −309 test/log-test.js
  44. +182 −163 test/ordinal-test.js
  45. +36 −41 test/point-test.js
  46. +368 −419 test/pow-test.js
  47. +110 −114 test/quantile-test.js
  48. +95 −96 test/quantize-test.js
  49. +80 −0 test/radial-test.js
  50. +2 −2 test/roundEpsilon.js
  51. +97 −78 test/sequential-test.js
  52. +26 −0 test/sequentialQuantile-test.js
  53. +11 −15 test/sqrt-test.js
  54. +170 −0 test/symlog-test.js
  55. +64 −60 test/threshold-test.js
  56. +33 −38 test/tickFormat-test.js
  57. +300 −342 test/time-test.js
  58. +289 −334 test/utcTime-test.js
  59. +915 −634 yarn.lock
4 changes: 1 addition & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -5,9 +5,7 @@
"ecmaVersion": 8
},
"env": {
"es6": true,
"node": true,
"browser": true
"es6": true
},
"rules": {
"no-cond-assign": 0
18 changes: 18 additions & 0 deletions .github/eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "eslint-compact",
"pattern": [
{
"regexp": "^(.+):\\sline\\s(\\d+),\\scol\\s(\\d+),\\s(Error|Warning|Info)\\s-\\s(.+)\\s\\((.+)\\)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5,
"code": 6
}
]
}
]
}
30 changes: 30 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn --frozen-lockfile
- run: |
echo ::add-matcher::.github/eslint.json
yarn run eslint src test --format=compact
- run: yarn test
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

40 changes: 13 additions & 27 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
Copyright 2010-2015 Mike Bostock
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the author nor the names of contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2010-2021 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
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
Loading