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

折线图同时存在3个不同尺度的曲线 如果数值差异很大 会显示的尺寸 导致数值较小的很难看 #3547

Closed
1 task
yehoan opened this issue Aug 3, 2021 · 3 comments
Labels

Comments

@yehoan
Copy link

yehoan commented Aug 3, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

直接点开demo 即可

Environment Info
g2 4.1.22
System win10
Browser 谷歌
@yehoan
Copy link
Author

yehoan commented Aug 3, 2021

当一个图表展示不同数值的折线图怎么才能显示的更加合理
image

@yehoan
Copy link
Author

yehoan commented Aug 3, 2021

类似这样怎么显示的更加合理

@pearmini
Copy link
Member

可以尝试使用 log 比例尺,减少他们之间的差异,但是数据有负数的情况使用 log 会出现问题,因为不能取一个负数的自然对数。

chart.scale({
  month: {
    range: [0, 1],
  },
  temperature: {
    nice: true,
    type: 'log',
    min: 0.1,
  },
});

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

No branches or pull requests

2 participants