Viewing a saved revision (read-only)
c9ad50ada6754a25961efbed8987c54f
Properly working radio button
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