提交 0f84e121 编写于 作者: C c-okelly

Ensure absolute values are used when adjusting axis scale

上级 e5617aaa
......@@ -162,7 +162,9 @@ export function adjustScaleForOverflow(min, max, model) {
zrUtil.each(barsOnCurrentAxis, function (item) {
maxOverflow = Math.max(item.offset + item.width, maxOverflow);
});
var totalOverFlow = Math.abs(minOverflow) + maxOverflow;
minOverflow = Math.abs(minOverflow);
maxOverflow = Math.abs(maxOverflow);
var totalOverFlow = minOverflow + maxOverflow;
// Calulate required buffer based on old range and overflow
var oldRange = max - min;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册