Skip to content

Limit start & end date #271

@rmehner

Description

@rmehner

👋

First of all: Thanks for all the work on this library, worked really well for us so far :)

For our app, we need to be able to limit the start date and the end date and need to disallow zooming / panning beyond that. We're setting the date range initially like this:

const config = {
 // ... omitting other values for readability
  range: {
    start: new Date('2019/01/01'),
    end: new Date('2019/05/27'),
  },
}

So the initial state is correct, but it allows to scroll beyond that. onZoomEnd triggers after the chart already has been redrawn and even with the other event listeners, the redraw usually happens before we can limit the date again, leading to some flickering.

Any ideas / hints on how to achieve what we want to achieve? Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions