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

在使用折线图时,y轴数据出现很长的小数 #16

Open
vonyoki opened this issue Oct 9, 2019 · 5 comments
Open

在使用折线图时,y轴数据出现很长的小数 #16

vonyoki opened this issue Oct 9, 2019 · 5 comments

Comments

@vonyoki
Copy link

vonyoki commented Oct 9, 2019

数据都是整数的,但偶尔在y轴上的数字会变成很长的小数
改变行数可以正常显示 但新的数据又会复现
之前出现问题后将行数由4改成了5 但今天又出想同样的问题了

@vonyoki
Copy link
Author

vonyoki commented Oct 9, 2019

[{"time":"10.03","sum":0},{"time":"10.04","sum":0},{"time":"10.05","sum":0},{"time":"10.06","sum":0},{"time":"10.07","sum":0},{"time":"10.08","sum":873},{"time":"10.09","sum":168}]
问题数据如上
time是x轴 sum是y轴

@vonyoki
Copy link
Author

vonyoki commented Oct 9, 2019

label没法使用function去设置text

@army8735
Copy link
Contributor

只能加配置了

@vonyoki
Copy link
Author

vonyoki commented Oct 10, 2019

只能加配置了

先换f2用吧 就稍微复杂一点

@W0916
Copy link

W0916 commented Mar 30, 2020

chart.source(data, {
value: {
formatter: function formatter(ivalue) {
return ivalue.toFixed(1);
}
}
});
这问题我也碰见很多次,我都是保留一位小数点或者parseInt取整,当前的问题是解决了,但不知道后面会不会还有问题

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

3 participants