vizzuhq / vizzu-lib

Library for animated data visualizations and data stories.

Home Page:https://lib.vizzuhq.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Most basic interaction example

jchrom opened this issue · comments

Is there an example of user interaction, i.e. I click a button, chart gets updated (for example with a different filter value)? I assume this could be achieved by registering a handler via chart.on() but the tutorial does not seem to have an example of this.

You can find an example how to attach a handler to the click event here: https://lib.vizzuhq.com/0.4/#chapter-0.16
The event.data contains info about the marker clicked, what you can use to filter the data.

Here is an example for filtering the data based on the clicked marker:
https://jsfiddle.net/msayp7zd/