Fork of barGraph
✓ Published0🌍 Public
This example shows a bar chart of country populations, which can be sorted in ascending or descending order via buttons. The chart uses D3's `scaleBand` and `scaleLinear` for axes, and displays tooltips with population and country names on hover. Data is loaded from a CSV file using `csv`, and the SVG rendering uses D3's `select`, `axisBottom`, and `axisLeft`. The code is written as an ES6 module, importing functions like `max` and `scaleBand` directly from D3.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed