sgratzl / chartjs-chart-boxplot

Chart.js Box Plots and Violin Plot Charts
https://www.sgratzl.com/chartjs-chart-boxplot/
MIT License
101 stars 23 forks source link

boxplot displaying the min/max as top and bottom whiskers #70

Closed ftiercelin closed 1 year ago

ftiercelin commented 1 year ago

Hello,

First of all, many thanks for this very useful library.

I thought the top and bottom whiskers of a box plot would represent the max/min values. It seems that by default, boxplots are using the IQR to define the top/bottom whiskers. e.g. with these 2 populations:

where population 1 has an IQR of 20 versus an IQR of 10 for population 2 but all other values being identical. I'm getting the following graph: image

I understand the benefits of using the IQR to define the top/bottom whiskers, but is there a way to not use the IQR and just use the min/max, no matter what they are?

chart.js@4.3.0 chartjs-chart-boxplot@4.2.0

sgratzl commented 1 year ago

see https://github.com/sgratzl/chartjs-chart-boxplot/blob/ecf744254bcabcbd137f3b7cc4aea2aec41d07d5/src/data.ts#L104-L137

ftiercelin commented 1 year ago

Thanks!