How to control d3.brush selection with mouse wheel


I have a timeline that I’m using to control a few different visualizations with a d3 brushed selection. I wanted to tie the mouse scroll wheel to the movement of the timeline along the x-axis. So if I scroll down it would move the selection to the left and moving it up would move the selection right. I know that d3 has the ability to detect mouse events, but I haven’t seen anything yet for detecting scroll wheel events. Is there any built-in way to detect or control scroll wheel events in d3?

Source: JavaSript – Stack Overflow

November 22, 2021
Category : News
Tags: D3.js | javascript

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.