Relative Content

Tag Archive for javascriptd3.jsbrushsnapping

Is it possible to do brush snapping in d3.js when there isn’t a regular interval?

I have a bar chart in d3 that uses focus/context. When the user brushes to select the dates, I want to snap to the dates available, rather than them being able to brush to any date between the beginning and end. This brush snapping example uses a twelve hour interval. In my case, there is no regular interval. Is there a way to snap to the dates with data?