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

Make the line charts take up all space #7

Closed
alberto56 opened this issue Aug 20, 2024 · 1 comment
Closed

Make the line charts take up all space #7

alberto56 opened this issue Aug 20, 2024 · 1 comment

Comments

@alberto56
Copy link
Contributor

No description provided.

@alberto56
Copy link
Contributor Author

Get the latest master of #7

./scripts/deploy.sh

Go to /line-chart-multiple-lines.html

Confirm that the minimum is close to zero, and the maximum is close to 39

Screenshot 2024-08-20 at 13 38 42

Uncheck all except "amount 1"

Confirm the minimum is 17 and the maximum is around 36

Screenshot 2024-08-20 at 13 39 48

Your task 1: recalculate y axix

Every time we select or unselect a data source, recalculate the y axis so that we have no white space at the top or bottom

We want something like this:

Screenshot 2024-08-20 at 13 42 49

Your task 2: animation

When we disable or enable a data source, we will recalculate the y axis, but instead of having the line jump from the old y axis to the new y axis, we want a smooth 300 milisecond or so animation to bring the remaining line from the old to the new y axis.

See https://stackoverflow.com/questions/71328594/axis-scale-shift-in-d3-js for an example of animation in d3

See https://hackernoon.com/animating-line-charts-with-d3js also

Please make sure the chart and its animation looks nice to you

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

1 participant