Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(interaction): emit element highlight #5117

Merged
merged 1 commit into from
May 30, 2023
Merged

Conversation

pearmini
Copy link
Member

Element highlight

emit-element-highlight

触发事件

chart.emit('element:highlight', {
  data: { data: { population: 5038433 } },
});

chart.emit('element:unhighlight', {});

获得数据

chart.on('element:highlight', (event) => {
  const { data, nativeEvent } = event;
  if (nativeEvent) console.log('element:highlight', data);
});

chart.on('element:unhighlight', (event) => {
  const { nativeEvent } = event;
  if (nativeEvent) console.log('reset');
});

@pearmini pearmini requested a review from hustcc May 29, 2023 11:25
@pearmini pearmini merged commit 44b8ee5 into v5 May 30, 2023
3 checks passed
@pearmini pearmini deleted the feat/emit-element-highlight branch May 30, 2023 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants