antvis/G2

图例的Mode Api被删掉了嘛 #3771

harrylu99 posted onGitHub

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

What problem does this feature solve?

想在图例上实现单选的功能,看到旧版本是支持的

旧文档

现在文档中也没看到,加入后也不生效,是把这个功能删掉了嘛

What does the proposed API look like?

希望还可以继续支持这个功能

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


自己注册一个单选功能,就可以实现了。如下:单击单选,双击取消

    // 复写 图例筛选 交互。1、点击图例名称 进行 unchecked 状态的切换 2、点击图例 marker,进行 checked 状态的切换(进行聚焦)3、双击 重置状态
    chart.interaction('legend-filter', {
      start: [
        { trigger: 'legend-item:click', action: ['list-checked:checked', 'data-filter:filter'] },
      ],
      end: [{ trigger: 'legend-item:dblclick', action: ['list-checked:reset', 'data-filter:filter'] }],
    });
posted by visiky over 3 years ago

V5 版本中怎么实现这个功能呢?相关文档:https://g2.antv.antgroup.com/spec/interaction/legend-filter

posted by daief 9 months ago

Fund this Issue

$0.00
Funded

Pull requests