-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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轴type为对数轴,Y轴数据有时显示格式错误,不再是对数的成了小数 #3161
Comments
如果你的问题的意思,不是“Y轴不是对数而是小数”,而是“如何使Y轴显示整数,那么设置 yAxis: {
type: 'log',
name: 'y',
axisLabel: {
formatter: function(v) {
return Math.floor(v);
}
}
}, |
好的 3Q |
你 |
我的意思是 0 的对数是没有意义的 |
对数轴的意思是Y轴的数值是成指数级增长的吧。和数值没有关系吧,现在数据中确实有数据是0 。比如我这个图表要显示最近30天的交易成交额,每天的成交额差距可能很大,有时候是千万,有时候是几百,有时候是几千,有时候为0。这种差距比较大,所以我们需要使用对数轴,在图表上显示出每天的成交额。。。。 |
100pah
added a commit
that referenced
this issue
Dec 25, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题简述 (One-line summary)
当Y轴type为对数轴,Y轴数据有时显示格式错误,Y轴上的值显示成了小数。
版本及环境 (Version & Environment)
重现步骤 (Steps to reproduce)
1.打开官网对数轴实例:http://echarts.baidu.com/demo.html#line-log
2.将3条折线的值改成如下这样,问题出现Y轴的值不在是对数的成了小数:
期望结果 (Expected behaviour)
期望无论series的data怎么变化Y轴都是对数轴
可能哪里有问题 (What went wrong)
根据series的data值渲染Y轴刻度值得时候出错。
ECharts配置项 (ECharts option)
其他信息 (Other comments)
The text was updated successfully, but these errors were encountered: