marmelab/EventDrops

Dot's disappearing when minimum scale is 1 and constraint on zoom

Busteren opened this issue · 0 comments

What you were expecting:

So when the minimum scale is set to 1 (one cannot zoom out more than the boundaries of the data. So say, we have 1 January 2017 and 31 December 2017, one cannot zoom out more than a year).

Then I modified the zoom to add transelateExtent and extent, this avoids the panning outside the initial boundaries. So it is not possible to pan to say 2016 or 2018 (might make a PR for this soon).

What happened instead:

This, however, causes some drops to not be able to see with panning when zoomed in. This is because the drops are on the extreme edges of the viewport. See the pictures below:
Shows the right hand of the chart, where the date is cut off (on the axis)
Shows the right hand of the chart, where the date is cut off

Zoomed in and panned to the right as much as possible. It is not possible to reach the drops further to the right.
Zoomed in and panned to the right as much as possible

Just showing the elements and length
No drops after

Drops after

Not really a bug, but maybe add some right and left margins to the chart in order to avoid the zoomable problem?

Will have a look at it

Environment

  • EventDrops version 1.3.0
  • Browser: Chrome Version 73.0.3683.86 (Official Build) (64-bit)