Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit draw() call does not update internal state of the chart #252

Open
val-janeiko opened this issue Aug 12, 2018 · 1 comment
Open

Comments

@val-janeiko
Copy link

What you were expecting:

After calling draw() with a scale parameter different than the current state of the chart, when a user tries to zoom/pan the chart it should zoom/scroll from the scale specified in the draw() call.

What happened instead:

After calling draw() with a scale parameter different than the current state of the chart, when a user tries to zoom/pan the chart it resets zoom and pan to the state it was before draw() was issued.

Related code:

https://jsfiddle.net/6rqxusw5/271/

var scale = d3.scaleTime().domain([new Date('01/01/2017 12:00:00 AM'), new Date('02/01/2017 12:00:00 AM')]).range(chart.scale().range());
chart.draw(config, scale)(d3.select('#events').data([repositoriesData]));

Environment

  • EventDrops version: 1.3.0
  • Browser: Chrome, Firefox, Edge
@Busteren
Copy link
Contributor

Busteren commented Jan 3, 2019

You can probably modify the source and make a programmatical zoom function or something. Then you can zoom to domain:
zoom to domain in D3

You probably only want to draw the chart once, and then use zoom programmatically to change the domain (ranges of dates you view).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants