antvis/G2

Do you want to work on this issue?

You can request for a bounty in order to promote it!

坐标轴可以画在绘制区域 #4593

pearmini posted onGitHub

坐标轴灵活布局

希望坐标轴可以画在如下图蓝色位置。

image

实现思路

坐标轴也是一种 Mark,这里和 ruleX 很像。可以通过设置 position 来指定绘制区域。

G2.render({
  type: 'point',
  axis: {
    y: {
      position: 'plot', //  在 plot 区域绘制
      x: [3], // 数据驱动的位置
    },
  },
});

这个可能比较麻烦,需要 axis 和 grid 分开渲染。

posted by pearmini over 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests