🌍 Public
Viewing a saved revision (read-only)
f55452eb6c9d4c16973d3e31dce156c7
Bar chart on iris-dataset
This example presents a horizontal bar chart that visualizes the sepal length of different iris species classes from the classic Iris dataset. The chart encodes the measured sepal length along the x-axis, with each bar positioned by its corresponding flower class on the y-axis. The visual encoding clearly compares the distribution of sepal lengths across the three species. Using D3 v5, the code loads the dataset from a CSV file, scales the data with `d3.scaleLinear` and `d3.scaleBand`, and renders the visualization as SVG elements within an HTML canvas. Axis labels and a title are also generated using D3's axis utilities.
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.