X-Value Mouseover with Pan & Zoom
This interactive line chart displays the price of a commodity over time, allowing users to pan and zoom through the data. The visualization updates the x-axis and y-axis scales dynamically, while a mouseover reveals the exact price value at any point. Built with D3 v4, the example uses `d3.zoom()` and `d3.zoomTransform()` to handle the zoom and pan transformations, and `d3.bisector` for data lookup. The data is loaded from a CSV file with date-time and price columns.
AI-generated descriptionBuilt with blockbuilder.org
d3 V4 extension to X-Value mouseover found <a href="https://bl.ocks.org/mbostock/3902569">here</a>.
Achieved by accessing zoom transform properties x, y and k in mousemove() and zoomed() function.
Happy to offer assistance in reproductions, tweet me at @LynchThomas
forked from <a href='http://bl.ocks.org/twlynch/'>twlynch</a>'s block: <a href='http://bl.ocks.org/twlynch/d51ed36f59356b70aa8eb410f761af1f'>X-Value Mouseover with Pan & Zoom</a>
forked from <a href='http://bl.ocks.org/lorenzopub/'>lorenzopub</a>'s block: <a href='http://bl.ocks.org/lorenzopub/013c0c41f9ffab4d27f860127f79c5f5'>X-Value Mouseover with Pan & Zoom</a>