Canvas with date axis: k and x do not seem to match #3638
-
I am trying to implement zoom on canvas. Since I need to reload data, I don't want to transform the canvas, but to set a new axis with the according start and end dates. Dragging works fine like this, but the x-Axis shift when zooming is off. I am using (x * t_k + t_x) to calculate the x-Axis shift. What am I missing here? Minimal working example: observablehq.com/d/881735544d5f93f1
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can use transform.rescaleX(xScale), I've sent you a suggestion. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, this is working great.
|
Beta Was this translation helpful? Give feedback.
You can use transform.rescaleX(xScale), I've sent you a suggestion.