G6
G6 copied to clipboard
timebar 如何默认渲染”单一时间“,而不是”时间范围“
问题描述
timebar 如何默认渲染”单一时间“,而不是”时间范围“
重现链接
不需要
重现步骤
不需要
预期行为
timebar 如何默认渲染”单一时间“,而不是”时间范围“
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
可以手动触发时间切换的事件点击么?
补充说明(可选)
No response
暂时没有开放该选项的配置,欢迎社区 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 })
目前已支持配置默认的时间类型,在 controllerCfg
中配置 defaultTimeType
https://g6.antv.antgroup.com/api/plugins#timebar