question_2
✓ Published0🌍 Public
This example visualizes the classic Iris flower dataset, plotting petal and sepal lengths for each species along a horizontal axis. It uses D3.js v7 with a band scale for the categorical species on the y-axis and a linear scale for length. Circles are rendered in SVG, with petal lengths in steel blue and sepal lengths in green. Hovering changes a circle's fill color. The code loads data via `d3.csv` and uses `d3.scaleLinear`, `d3.scaleBand`, `d3.axisBottom`, and `d3.axisLeft` to construct the chart.
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