D3 ver.4 - ordinal scale invert
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 descriptionThis 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.