Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

1116东南crosswalk堆叠图

Public visualization

Viewing a saved revision (read-only)

8a5a6a5fe4b44e68b07e44ab62b7f2b8

1116东南crosswalk堆叠图

0 stars1🌍 Public
Vvivianaaai@qq.com
Last edited Nov 16, 2023
Created on Nov 16, 2023

This example shows how traffic counts for pedestrians, bicycles, and motor vehicles at a single crosswalk are visualized as a stacked bar chart. A single bar represents the total count for one lane, with each stacked segment colored according to category using D3’s `scaleOrdinal` and `schemeSet3`. The chart uses `d3.stack()` to compute the stacked series, `scaleBand` for the x-axis, and `scaleLinear` for the y-axis. The legend is built with plain HTML divs, while axes are rendered via `d3.axisLeft` and `d3.axisBottom`.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.