Skip to main content
100%

Bars

✓ Published1🌍 Public
Jjoanoliper
Last edited Sep 19, 2019
Created on Sep 19, 2019
Forked from Bars

This bar chart displays the asset allocation percentages of a portfolio sample, with each bar labeled by asset type. It uses D3 v5’s `scaleLinear` and `scaleBand` to map allocation values and asset names, respectively, and renders an SVG with axes via `axisLeft` and `axisBottom`. Data is loaded from `data.csv` using the `csv` method, and bars are appended as `rect` elements with widths proportional to allocation. The chart is styled with a steelblue fill for the bars and includes a left margin for the categorical labels.

AI-generated description

This bar chart shows weights for a portfolio sample.

MIT Licensed

Similar vizzes