ant-design-charts icon indicating copy to clipboard operation
ant-design-charts copied to clipboard

🧐[问题] 分组柱状图鼠标悬浮时的 region 如何使用 annotations 实现?

Open Styx11 opened this issue 3 years ago • 1 comments

🧐 问题描述 [详细地描述问题,让大家都能理解]

我们现有一个需求是在分组柱状图的每组柱图背景上显示和 tooltip 一样的 region 截屏2022-01-13 下午2 30 45 我的思路是使用 annotations 去实现

annotations: [
      {
        type: 'region',
        start: ['7', 'min'],
        end: ['9', 'max'],
      },
]

但是 startend 好像只能配置不同 x 轴的范围,不能单独针对一个 x 坐标上的柱图 硬编码的话也不太好找这个范围。。。 截屏2022-01-13 下午5 01 06

所以想请教一下作者怎么实现 tooltip 下面那种 region 的效果😅 截屏2022-01-13 下午5 03 44

Styx11 avatar Jan 13 '22 09:01 Styx11