Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

loreal dataviz updates

Public visualization

Viewing a saved revision (read-only)

eddb626f57584cd0af5e4af749915bf7

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