recharts: 1.3.0 DecimalError bug
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
Throws DecimalError.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: http://jsfiddle.net/ndLhnegs/).
[DecimalError] Invalid argument: Infinity at new Decimal (http://localhost:3000/static/js/bundle.js:14958:17) at getTickValuesFixedDomainFn
What is the expected behavior?
Version 1.3.0 is compatible with 1.2.0.
Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?
1.3.0, bug found in latest Chrome.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 18 (7 by maintainers)
Commits related to this issue
- fix: revert recharts to 1.2.0 (closes #162 and #163) (#165) See: https://github.com/recharts/recharts/issues/1493#issuecomment-426735268 — committed to wopian/kitsu-season-trends by wopian 6 years ago
- feat: update recharts-scale to 0.4.2 to fix bug of DecimalError when data is Inifinity, fix #1493 — committed to nutshellcrm/recharts by xile611 6 years ago
- fix: revert recharts to 1.2.0 (closes #162 and #163) (#165) See: https://github.com/recharts/recharts/issues/1493#issuecomment-426735268 — committed to wopian/kitsu-season-trends by wopian 6 years ago
After upgrading to recharts
1.6.xI am seeing this issue on a basic line chart withdata = []and the domain set to be["dataMin", "dataMax"]. Can this be reopened or should I create a new issue?I’m receiving “[DecimalError] Invalid argument: NaN” in
1.6.0with this:<XAxis dataKey="time" type="number" domain={['dataMin', 'dataMax']} />and empty data array.https://codepen.io/anon/pen/xNdZgQ?editors=0010
The same error happens when data array is not empty, but
dataKeyprops are strings instead of numbers. More descriptive error would be appreciated, otherwise its hard to tell what’s going on.@wopian It’s ok to use 1.3.3 https://codepen.io/anon/pen/bmWNVb?editors=0010