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

restore brush animation and correct height on resize #1399

Closed
gordonwoodhull opened this issue Apr 8, 2018 · 6 comments
Closed

restore brush animation and correct height on resize #1399

gordonwoodhull opened this issue Apr 8, 2018 · 6 comments
Milestone

Comments

@gordonwoodhull
Copy link
Contributor

In this example you can resize the browser window to test chart resizing:

http://127.0.0.1:8888/web/resizing/resizing-bar.html

The brush used to transition at the same speed as the chart; now it changes immediately. (This was the purpose of the doTransition argument to redrawBrush, used in drawChart.)

Also it seems to get the width right but height stays at the original height.

If you fix the onresize bug (thank you @kum-deepak!), this example works in 2.1: http://dc-js.github.io/dc.js/resizing/resizing-bar.html

@gordonwoodhull gordonwoodhull added this to the 3.0 milestone Apr 8, 2018
@kum-deepak
Copy link
Collaborator

On to it :)

@kum-deepak
Copy link
Collaborator

Looks like I have to practice first some transition examples.

As of now I am able to handle the resizing correctly, animate the brush handles. Unable to animate the brush selection rectangle (it is done by d3.brush, but the documentation says that transitions can be applied on that).

@gordonwoodhull
Copy link
Contributor Author

Don't you just pass a transition to _brush.move instead of a selection? That is sort of how it used to work, except that it was just something.call(_brush) before.

@kum-deepak
Copy link
Collaborator

kum-deepak commented Apr 10, 2018

I must be making some simple error. There is a sample as well where they animate the brush selection:
https://bl.ocks.org/mbostock/6232537 (similar to our rounding case)

I will commit one version later in the day my time.

@kum-deepak
Copy link
Collaborator

Started work #1402. Based on your feedback, I will implement for other classes as well.

@gordonwoodhull
Copy link
Contributor Author

fixed in 3.0 alpha 7

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