G6 icon indicating copy to clipboard operation
G6 copied to clipboard

timebar 如何默认渲染”单一时间“,而不是”时间范围“

Open WangXang opened this issue 1 year ago • 1 comments

问题描述

timebar 如何默认渲染”单一时间“,而不是”时间范围“

重现链接

不需要

重现步骤

不需要

预期行为

timebar 如何默认渲染”单一时间“,而不是”时间范围“

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • G6 版本: [4.5.1 ... ]

屏幕截图或视频(可选)

image 可以手动触发时间切换的事件点击么?

补充说明(可选)

No response

WangXang avatar Aug 11 '22 00:08 WangXang

暂时没有开放该选项的配置,欢迎社区 pr

暂时使用但不推荐,可以通过这种方式模拟点击

const toggleGroup = timebar.get('timebar').controllerBtnGroup.toggleGroup; const toggleShape = toggleGroup.find(e => e.get('name') === 'toggle-model') toggleGroup.emit('toggle-model:click', { target: toggleShape })

Yanyan-Wang avatar Aug 19 '22 07:08 Yanyan-Wang

目前已支持配置默认的时间类型,在 controllerCfg 中配置 defaultTimeType https://g6.antv.antgroup.com/api/plugins#timebar

Yanyan-Wang avatar Nov 29 '22 09:11 Yanyan-Wang