The data I'm working with has a 'floor' granularity of 'Days'. Anything more fine-grain (e.g. hours) does not make sense. However the ChartJS plugin allows the user to keep zooming to finer scales.
How can I detect that the zoom level has now hit 'Days' and prevent any further zoom-in? I would like to allow zooming from year -> day level but nothing past this.
I solved this with what I consider a hack:
onZoomStart
callback. (docs)Notes:
event.deltaY > 0
the event is a zoom-out, else zoom-in