Skip to content

Dynamic Axis Scaling in Animated Charts #3596

Answered by curran
philippulus asked this question in Q&A
Discussion options

You must be logged in to vote

Here's a snippet that does dynamic ticks based on a specified density (ticks per pixel):

axisLeft(yScale).ticks(yTickDensity * (height - margin.bottom - margin.top))

Here's an old piece on bl.ocks.org that does this: https://bl.ocks.org/curran/6f97aa94357cae4611c54a80c11f6128

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Fil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants