Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

loreal dataviz updates

Public visualization

Viewing a saved revision (read-only)

51c80cf284d0455ea1f9e2873ee1869a

loreal dataviz updates

0 stars0🌍 Public
HHilario Calderon
Last edited Oct 9, 2019
Created on Oct 9, 2019

This interactive bar chart displays survey respondent demographics, with buttons to toggle between gender, age group, generation, and province categories. The horizontal bars show the percentage of respondents in each category, with labels indicating the exact values. Using d3.v5, the visualization loads CSV data, computes grouped percentages via `d3.nest()`, and renders SVG rectangles with animated transitions. Axes and labels are generated with `axisLeft`, `axisBottom`, and `scaleBand`, while button clicks trigger the `update` function to swap datasets.

AI-generated description

Customizing the axis and the datasets by getting different data sets