Skip to main content
100%

Acticity 7 tutorial2

✓ Published0🌍 Public
Hhaneesh@gctc.in
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Hello VizHub

This example shows a stacked bar chart comparing average horsepower, torque, and highway MPG for several car makes, using an ordinal color scale and a legend to distinguish the three metrics. It renders the chart as an SVG and relies on D3.js version 7 APIs including `d3.stack` for data stacking, `d3.scaleBand` for categorical positioning, `d3.scaleLinear` for the y-axis, and `d3.axisBottom` with rotated labels to handle long axis text. The data is embedded directly in the script rather than loaded from an external file.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes