Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

precision -1 out of range #22

Closed
shinnc opened this issue Jan 11, 2019 · 6 comments
Closed

precision -1 out of range #22

shinnc opened this issue Jan 11, 2019 · 6 comments

Comments

@shinnc
Copy link

shinnc commented Jan 11, 2019

I got the error from this line, may I know what's the reason there's a negative number for the precision?

// echarts-stat/dist/ecStat.js:1393
return + ((stop >= start ? step1 : -step1).toFixed(-precision));

These are the arguments in the function triggered the error: start=1199, stop=1953, count=9

This is how I initialize the graph:

data = [1701, 1585, 1669, 1953, 1429, 1593, 1641, 1638, 1768, 1524, 1608, 1679, 1731, 1254, 1232, 1238, 1661, 1199, 1921, 1731, 1570, 1548, 1521, 1548, 1620, 1811, 1696, 1527, 1771, 1477, 1775, 1672, 1330, 1400, 1780, 1716, 1811, 1626, 1519, 1395, 1677, 1295, 1317, 1411, 1524, 1291, 1570, 1540, 1690, 1616, 1707, 1748, 1631, 1569, 1557, 1602, 1530, 1811, 1606, 1480, 1528, 1277, 1638, 1579, 1580, 1493]
const bins = ecStat.histogram(data)

Edited: Just notice there's existing PR and issues #16, #21 addressing this, hence closing. Any maintainers care to merge the PR and release it?

@shinnc shinnc closed this as completed Jan 11, 2019
@limeng1900
Copy link

@deqingli 麻烦请问下大佬这个库是否还有后续的维护更新?直方图遇到同样的问题。

@wmhh1129
Copy link

wmhh1129 commented Mar 4, 2019

@shinnyx hey bro,can you get the solution?

@shinnc
Copy link
Author

shinnc commented Mar 5, 2019

@wmhh1129 I fixed it by myself, realised that the PR #18 wasn't really fixing the actual issue. urbanzoom@e389533

@wmhh1129
Copy link

wmhh1129 commented Mar 5, 2019

@shinnyx sounds cool,i also realised that the PR seems useless,have you release your version in npm?

@shinnc
Copy link
Author

shinnc commented Mar 7, 2019

@wmhh1129 Nope I didn't, I just explicitly specify in package.json to use the github version at the moment.

@janhartmann
Copy link

Is there anyone who can run a fork of this with these changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants