Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Animated Bar Chart w/ dropdown

Public visualization

Animated Bar Chart w/ dropdown

0 stars1🌍 Public
AAdan Rodriguez
Last edited Feb 6, 2023
Created on Feb 5, 2023

This example presents an animated bar chart where users can toggle between revenue and profit metrics via a dropdown menu. The chart loads monthly financial data from a CSV file and renders it as SVG rectangles using D3 v7's `scaleBand` and `scaleLinear`. Selecting a different option triggers a `transition` that smoothly animates the bars to their new heights over 750 milliseconds. The visualization uses D3's `select` and `property` methods to handle the dropdown interaction, demonstrating dynamic data binding and transitions.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed