I am trying to emulate vega-lite events to trigger interactions on charts manually through javascript.
I am able to dispatch events and get them to be reconized by the listner, however the event doesn't register any items and does not trigger the visualization state to change.
Here is a codesandbox where I try to emulate a click event on the chart. You can see in the console the event registering in the event listener but not triggering the interaction. Is there a specific way to dispatch events? Is there a method similar to resluts.view.dispatch(event)?
I have prepared a demo which may help you. This HTML file will create a bar chart that highlights each bar in sequence when you click the "Emulate Click" button.
I have created a param and referenced this in the embed code:
Here is an alternative embed code which selects the bars based on the value ranking highest to lowest. Useful in a meeting if you wanted to highlight the highest bar and then the next highest etc:)
Happy charting! Adam from APB Reports