Skip to main content
100%

Properly working radio button

✓ Published1🌍 Public
GGayan Priyadarshana
Last edited Aug 18, 2023
Created on Aug 18, 2023

This visualization displays the total value of steel scrap imports or exports for various countries, using a treemap where each rectangle represents a country and its area corresponds to the monetary value. Users toggle between Import and Export data via radio buttons, which filters the dataset and re-renders the treemap with a light-to-dark blue color scale. The visualization uses D3.js version 7 with the `d3.treemap`, `d3.hierarchy`, and `d3.scaleSequential` APIs to build the interactive SVG graphic, reading data from a CSV file. The code also includes a reset button to restore the initial view, though the drill-down behavior on rectangle click is only partially implemented.

AI-generated description
MIT Licensed

Similar vizzes