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 legend highlight #5126

Merged
merged 1 commit into from
May 30, 2023
Merged

Conversation

pearmini
Copy link
Member

Legend Highlight

legend-highlight

获得数据

chart.on('legend:highlight', (e) => {
  const { nativeEvent, data } = e;
  if (!nativeEvent) return;
  console.log(data);
});

chart.on('legend:unhighlight', (e) => {
  const { nativeEvent } = e;
  if (!nativeEvent) return;
  console.log('unhighlight');
});

触发交互

chart.emit('legend:highlight', {
  data: { channel: 'color', value: 'Increase' },
});

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

@pearmini pearmini force-pushed the feat/legend-highlight branch 2 times, most recently from 92b11ac to 042f2aa Compare May 30, 2023 09:54
@pearmini pearmini force-pushed the feat/legend-highlight branch from 042f2aa to b6dbb96 Compare May 30, 2023 09:58
@pearmini pearmini merged commit e796355 into v5 May 30, 2023
@pearmini pearmini deleted the feat/legend-highlight branch May 30, 2023 10:44
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.

2 participants