Skip to main content
Public

Share visualization

Loading preview…

BMW Simple Bar Chart

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

BMW Simple Bar Chart

0
BBismark Kofi Owusu Sarfo
Last edited Sep 30, 2025
Created on Sep 30, 2025

This example shows a bar chart of the top 10 countries by population, with clickable bars that highlight in orange when selected. The visualization loads data from a CSV of UN population estimates, filtering for country-level records and sorting by total population. Built with D3 v7 and d3-rosetta, it uses `scaleBand` and `scaleLinear` for positioning, `axisBottom` and `axisLeft` for axes, and a unidirectional data flow pattern managed by `createStateField`. Clicking a bar toggles its selection state, which re-renders the chart with the updated highlight.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed