Add interactivity and legend toggling to example (fixes #427)