antvis/G2

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

yehoan posted onGitHub

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

Edit on CodeSandbox

Steps to reproduce

直接点开demo 即可

Environment Info
g2 4.1.22
System win10
Browser 谷歌

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


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

posted by yehoan over 3 years ago

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

posted by yehoan over 3 years ago

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

chart.scale({
  month: {
    range: [0, 1],
  },
  temperature: {
    nice: true,
    type: 'log',
    min: 0.1,
  },
});
posted by pearmini over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests