Skip to main content
100%

Zoomable Area Canvas with Retina

✓ Published0🌍 Public
FFrissAnalytics
Last edited Sep 25, 2018
Created on Sep 25, 2018

This zoomable area chart displays time-series power consumption data from the TBLkW.csv file, showing hourly values in kilowatts. The visualization initially presents the full dataset, and users can zoom in using the mouse wheel through d3.zoom, which rescales the time axis via `rescaleX`. Unlike typical implementations, the zoom does not center over the cursor, and the area is rendered with an explicit clip path on a Canvas element using D3 v4’s `d3.area` with a step curve. The code also handles high-DPI displays by adjusting the canvas resolution for sharper visuals on retina screens.

AI-generated description

forked from <a href='http://bl.ocks.org/interwebjill/'>interwebjill</a>'s block: <a href='http://bl.ocks.org/interwebjill/1df7087950353c7525cb6e8360276d32'>Zoomable Area SVG</a>

which was forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4015254'>Zoomable Area</a>

Zoom is not centered over the mouse cursor.

forked from <a href='http://bl.ocks.org/interwebjill/'>interwebjill</a>'s block: <a href='http://bl.ocks.org/interwebjill/206425109aa902c2928fa22b8a9f5fd8'>Zoomable Area Canvas with Retina</a>

forked from <a href='http://bl.ocks.org/lorenzopub/'>lorenzopub</a>'s block: <a href='http://bl.ocks.org/lorenzopub/cdaf8f4c7aace62c195013421329c372'>Zoomable Area Canvas with Retina</a>

gpl-3.0 Licensed

Similar vizzes