recharts-scale
Advanced tools
Comparing version 0.1.2-beta to 0.1.3-beta
@@ -0,1 +1,5 @@ | ||
0.1.3-beta / 2015-12-25 | ||
================== | ||
* deps: update dependencies | ||
0.1.2-beta / 2015-11-04 | ||
@@ -2,0 +6,0 @@ ================== |
{ | ||
"name": "recharts-scale", | ||
"version": "0.1.2-beta", | ||
"version": "0.1.3-beta", | ||
"description": "Scale of Cartesian Coordinates", | ||
@@ -20,14 +20,17 @@ "main": "index.js", | ||
"devDependencies": { | ||
"babel": "^5.8.21", | ||
"babel-core": "^5.8.22", | ||
"babel-eslint": "^4.0.10", | ||
"chai": "^3.2.0", | ||
"eslint": "^1.2.1", | ||
"eslint-config-airbnb": "0.0.8", | ||
"isparta": "^3.0.3", | ||
"mocha": "^2.2.5" | ||
"babel-eslint": "5.0.0-beta6", | ||
"babel-plugin-transform-export-extensions": "6.3.13", | ||
"babel-preset-es2015": "6.3.13", | ||
"babel-preset-stage-0": "6.3.13", | ||
"babel-register": "^6.3.13", | ||
"chai": "3.4.1", | ||
"eslint": "1.10.3", | ||
"eslint-config-airbnb": "2.1.1", | ||
"eslint-plugin-react": "3.13.0", | ||
"isparta": "4.0.0", | ||
"mocha": "2.3.4" | ||
}, | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha --compilers js:babel/register --recursive", | ||
"test-cov": "./node_modules/.bin/babel-node ./node_modules/.bin/isparta cover --report html --report text node_modules/.bin/_mocha", | ||
"test": "./node_modules/.bin/mocha --compilers js:babel-register --recursive", | ||
"test-cov": "./node_modules/.bin/isparta cover node_modules/.bin/_mocha --report html --report text -- --require babel-register", | ||
"lint": "./node_modules/.bin/eslint src test" | ||
@@ -37,4 +40,4 @@ }, | ||
"dependencies": { | ||
"ramda": "^0.17.1" | ||
"ramda": "0.19.0" | ||
} | ||
} |
@@ -111,3 +111,3 @@ /** | ||
let belowCount = Math.ceil((middle - min) / step); | ||
let upCount = Math.ceil((max - middle) / step); | ||
let upCount = Math.ceil((max - middle) / step); | ||
const scaleCount = belowCount + upCount + 1; | ||
@@ -125,3 +125,3 @@ | ||
return { | ||
step: step, | ||
step, | ||
tickMin: Arithmetic.minus(middle, Arithmetic.multiply(belowCount, step)), | ||
@@ -149,3 +149,3 @@ tickMax: Arithmetic.sum(middle, Arithmetic.multiply(upCount, step)), | ||
// 获取间隔步长 | ||
const {step, tickMin, tickMax} = calculateStep(cormin, cormax, count); | ||
const { step, tickMin, tickMax } = calculateStep(cormin, cormax, count); | ||
@@ -152,0 +152,0 @@ const values = Arithmetic.rangeStep(tickMin, tickMax + 0.1 * step, step); |
import getNiceTickValues from './getNiceTickValues'; | ||
import R from 'ramda'; | ||
function getTickValues (domain, tickCount) { | ||
function getTickValues(domain, tickCount) { | ||
if (domain[0] === domain[1]) { | ||
@@ -8,5 +9,5 @@ return getNiceTickValues(domain, tickCount); | ||
tickCount = Math.max(tickCount, 2); | ||
const finalTickCount = Math.max(tickCount, 2); | ||
const step = (domain[1] - domain[0]) / (tickCount - 1); | ||
const step = (domain[1] - domain[0]) / (finalTickCount - 1); | ||
@@ -18,5 +19,5 @@ const fn = R.compose( | ||
return fn(0, tickCount); | ||
return fn(0, finalTickCount); | ||
} | ||
export default getNiceTickValues; | ||
export default getTickValues; |
@@ -135,6 +135,6 @@ /** | ||
const interpolateNumber = R.curry((a, b, t) => { | ||
a = +a; | ||
b = +b; | ||
const newA = +a; | ||
const newB = +b; | ||
return a + t * (b - a); | ||
return newA + t * (newB - newA); | ||
}); | ||
@@ -141,0 +141,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
12914
313
0
11
+ Addedramda@0.19.0(transitive)
- Removedramda@0.17.1(transitive)
Updatedramda@0.19.0