holtzy / D3-graph-gallery

A collection of simple graphics made with D3.js
https://www.d3-graph-gallery.com
MIT License
789 stars 237 forks source link

FIX: Matching names and data in stackedarea_basic.html #96

Open brown2243 opened 1 year ago

brown2243 commented 1 year ago

What?

I made changes to the part that retrieves the value with the key from stackedData and the part that retrieves the color with the key in "stackedarea_basic"

Why?

It seems that the data and the chart displayed on the "stackedarea_basic" page do not match.

How?

d[1][key].n; => d[1].find((row) => row.name === key)?.n || 0;

I am receiving a lot of help from your page. Thank you always. I would appreciate any feedback you may have.