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 filter #5127

Merged
merged 1 commit into from
May 30, 2023
Merged

feat(interaction): emit legend filter #5127

merged 1 commit into from
May 30, 2023

Conversation

pearmini
Copy link
Member

@pearmini pearmini commented May 30, 2023

Legend Filter

legend-filter

触发交互

chart.emit('legend:filter', {
  data: { channel: 'color', values: ['Sports', 'Strategy'] },
});

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

获得数据

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

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

@pearmini pearmini force-pushed the feat/legend-filter branch 2 times, most recently from 4fcf7b8 to 9f8d5c1 Compare May 30, 2023 09:56
@pearmini pearmini changed the base branch from v5 to feat/legend-highlight May 30, 2023 09:56
Base automatically changed from feat/legend-highlight to v5 May 30, 2023 10:44
@pearmini pearmini force-pushed the feat/legend-filter branch 2 times, most recently from 25ee199 to e03c466 Compare May 30, 2023 11:26
@pearmini pearmini requested a review from hustcc May 30, 2023 11:28
@hustcc hustcc merged commit b7071ef into v5 May 30, 2023
@hustcc hustcc deleted the feat/legend-filter branch May 30, 2023 14:05
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