Skip to main content
100%

EXPLORING BAR CHART (tooltip with foreignobject)

✓ Published2🌍 Public
GGuillamon
Last edited Nov 20, 2019
Created on Nov 19, 2019

This bar chart visualizes the population of the ten most populous countries using D3.v5 with SVG rendering and animation. It displays a horizontal bar chart with a green fill, showing population values on the x-axis and country names on the y-axis. Hovering over a bar triggers a tooltip rendered through a `foreignObject` with HTML content, displaying the country name and its population. The tooltip appears near the cursor, and the chart also includes gridlines with dashed styling. Data comes from a static CSV file.

AI-generated description

Mouseover and mouseout behaviour code taken from this tutorial: https://medium.com/@kj_schmidt/show-data-on-mouse-over-with-d3-js-3bf598ff8fc2

MIT Licensed

Similar vizzes