holtzy / D3-graph-gallery

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

Basic boxplot in d3.js "max" value is incorrect? #26

Open harplife opened 4 years ago

harplife commented 4 years ago

Hi, I was just looking at the code example for basic boxplot as provided in D3 graph gallery. I noticed that "max" value for the boxplot is incorrect. As far as I know, max('upper fence') is upper quartile + 1.5 IQR. However, the code in the example is `var max = q1 + 1.5 interQuantileRange. Perhaps it should beq3 + 1.5 * interQuantileRange` instead?