Scale of Cartesian Coordinates
recharts / recharts-scale Goto Github PK
View Code? Open in Web Editor NEWScale of Cartesian Coordinates
License: MIT License
Scale of Cartesian Coordinates
License: MIT License
[-2000, 3001]
cut to 4 pieces. The initial pieces is min 1 and max 2 with 2000 steps, So it's better to set min and max equal and find no remaining count then return.The use of Number.isFinite is not supported by IE11, failing with the error Object doesn't support property or method 'isFinite'
The source of the error appears to be this line:
recharts-scale/src/getNiceTickValues.js
Line 111 in 1513ce2
Using [email protected] from [email protected]
now scale(1, 5, 6)
return [ 0.85, 1.7, 2.55, 3.4, 4.25, 5.1 ]
expect result [0, 1, 2, 3, 4, 5 ]
or [1, 2, 3, 4, 5, 6 ]
5 ticks between (-Infinity, Infinity)
are not [Infinity, Infinity, Infinity, Infinity, -Infinity]
"domain": [
Infinity,
-Infinity
]
"niceTicks": [
Infinity,
Infinity,
Infinity,
Infinity,
-Infinity
]
this change is breaking that feature: recharts/recharts#1509
{
"allowDataOverflow": false,
"allowDecimals": true,
"allowDuplicatedCategory": true,
"axisLine": false,
"axisType": "yAxis",
"bandSize": 0,
"categoricalDomain": undefined,
"domain": [
Infinity,
-Infinity
],
"duplicateDomain": undefined,
"height": 356,
"hide": false,
"isCategorial": false,
"label": false,
"layout": "horizontal",
"mirror": false,
"niceTicks": [
Infinity,
Infinity,
Infinity,
Infinity,
-Infinity
],
"orientation": "left",
"originalDomain": [
"auto",
"auto"
],
"padding": {
"top": 0,
"bottom": 0
},
"realScaleType": "linear",
"reversed": false,
"scale": " ƒ scale(x)",
"tick": "",
"tickCount": 5,
"tickFormatter": "ƒ (v)",
"tickLine": false,
"type": "number",
"width": 31.796875,
"x": 0,
"y": 30,
"yAxisId": "1"
}
Hi,
Currently, recharts-scale and thus recharts itself is not compatible with snowpack or any other esm based tooling / bundlers as the latest version on npm doesn't have a module
build. I can see, that this was already submitted as a pull request and merged ~4 months ago. Would you mind tagging a new version (0.4.4) with this included?
Thanks!
hi rechart-scale team,
Something went wrong during my build process. the error occured during yarn install. from I can see, the path to a file is incorrect from node_modules.
Currently using recharts v^2.0.8
I'm not sure if it's due to the recent package update, but this failure just happened last night.
Can't https://github.com/d3/d3-scale/#continuous_ticks be used instead? Or what's the purpose of this library?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.