Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

recharts-scale

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recharts-scale - npm Package Compare versions

Comparing version 0.1.2-beta to 0.1.3-beta

4

History.md

@@ -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 @@ ==================

27

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc