Skip to main content
100%

D3 ver.4 - ordinal scale invert

✓ Published0🌍 Public
AArriannePandaraoan
Last edited May 8, 2020
Created on May 4, 2020
Forked from Data Table Summary

This example demonstrates a scatterplot-like visualization of hourly temperature data, where moving the mouse across the chart triggers a red guide line that snaps to the nearest categorical x-axis band. Built with D3 version 4.1.1, it uses a custom `invert` function on an ordinal `scaleBand` to map pixel coordinates back to categories, enabling the interactive hover effect. The SVG heatmap-style line chart is rendered with animated transitions for both the guide line and the axes.

AI-generated description

This program prints a summary of a data table.

This data is about population of the most populous countries in 2018.

This data comes from the year 2018 estimate in United Nations: World Population Prospects 2017.

The data is a "file" here, but the recommended approach is to upload the data seprately, as in the video below.

MIT Licensed

Similar vizzes