Skip to main content
100%

4) Bar Chart - Refactoring

✓ Published1🌍 Public
Bbrunoevione
Last edited Apr 2, 2021
Created on Apr 2, 2021

This bar chart displays population estimates for ten countries in 2020, using data from the United Nations World Population Prospects 2019. The visualization is built with React and D3 v5, rendering bars as SVG rectangles via a modular structure. D3 scales—`scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis—handle the mapping, while separate components for the bottom axis, left axis, and marks help organize the code. The chart highlights an approach that separates concerns for easier reuse in other visualizations, with the loading state shown as plain text until data arrives.

AI-generated description

Refactoring

Ajuda a:

  1. o codigo principal fica menor e com significado semantico
  2. atividades posteriores de fork e modificacoes para usar em outras visualizacoes ficam mais faceis

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes