EXPLORING BAR CHART
✓ Published4🌍 Public
This interactive bar chart visualizes population data for ten countries, displaying values horizontally with a logarithmic scale. The chart uses D3 v5 to render SVG graphics, with mouseover effects that display tooltips showing country names and population figures. Users can click bars to select them, changing their color from green to pink, while the entire visualization updates with smooth transitions. The code references D3's scaleLinear, scaleBand, and axis functions, along with custom mouse event handlers adapted from a Medium tutorial.
AI-generated descriptionMouseover and mouseout behaviour code taken from this tutorial: https://medium.com/@kj_schmidt/show-data-on-mouse-over-with-d3-js-3bf598ff8fc2
MIT Licensed