antvis / antvis/G2

[Feat]: 是否缺少一个mount()方法

Open
#6,917 3 comments 0 reactions 0 assignees View on GitHub
waiting for maintainer
Dominant language
TypeScript
Stars
12.6k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Describe the feature / 功能描述

使用的版本:v5.3.2
现在在`new Chart()`时传入`container节点或selector字符串`;
有些场景,需要先创建`Chart`实例,设置好图表数据后,最后再传入container,挂载到页面上;

考虑提供mount()方法实现动态挂载能力吗?

如果不考虑提供,那在创建`Chart`实例后,修改`_container`能达到一样效果?

### Are you willing to contribute? / 是否愿意参与贡献?

Please select / 请选择

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how the Chart constructor handles its container and how the _container field is used. Determine the intended lifecycle for creating a chart without a container and attaching it later, including the expected behavior when mount() is called. Done means the proposed API and its edge cases are clearly defined and validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.