Bar chart on iris-dataset
✓ Published1🌍 Public
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.
MIT Licensed