Skip to content

Multiple Triggers on SignalListener - Vega-Lite + Mutable #1829

Answered by mythmon
alessandrofajr asked this question in Q&A
Discussion options

You must be logged in to vote

At a glance, I don't see anywhere that you are unregistering the event handler. That would mean that every time the barchartView is updated and the signal handling block is re-run, you'd get duplicate events. This might not be the problem you're seeing, but as a matter of best practices I'd recommend removing the signal listener in response to the invalidation promise. I'd expect that to be something like

invalidation.then(() => barChartView.removeSignalListener("barSelect", handleBarSelection));

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@alessandrofajr
Comment options

Answer selected by alessandrofajr
Comment options

You must be logged in to vote
1 reply
@alessandrofajr
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants