antvis / antvis/G2Plot

interactions does not work when pass as config

Open
#2,983 5 comments 1 reaction 1 assignee Claimed by @visiky View on GitHub
Question
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

If you specify below interactions, chart is not able to be rendered:
var config = {
......
interactions: [{type: 'element-selected', cfg: {
start: [
{
trigger: 'element:click',
**action: 'element-selected:selected',**
callback(context) {
alert("ok");
}
}]
}}],
};
return ;

### 💻 Link to minimal reproduction
It can be reproduced by : https://codesandbox.io/s/wf152?file=/App.tsx:0-1011

### 🏞 Expected result
Chart should be rendered correctly
### 🚑 Any additional [like screenshots]
Screen Shot 2021-11-18 at 8 07 45 AM

* **G2Plot Version**:
* **Platform**:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.