antvis/G2

g2@4.2.4 can't show legend #4019

chi-gao posted onGitHub

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

Edit on CodeSandbox

Steps to reproduce

as the code shows, I set the legend visible, but it doesn't show. I had set the line size, line color and line shape attribute. and I had tried followings:

  • chart.legend(true)
  • chart.legend({ position: 'bottom'})
  • add bottom padding
Environment Info
g2 4.2.4
System -
Browser -

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


尝试g2降级到3.x,上述写法 图例是完美展示的。 目前可以确定确实是升级4.x带来的问题,所以不清楚是 4.x底层默认不支持 双轴图的图例展示, 还是 4.x升级时这部分逻辑漏掉了。 如果设计不支持,建议升级文档能够说明下,毕竟也算是 break change 了。

补充一个3.x的demo:https://codesandbox.io/s/young-mountain-x1u73c

posted by garygao12580 almost 3 years ago

Fund this Issue

$0.00
Funded

Pull requests