var min = q1 - 1.5 * interQuantileRange
var max = q1 + 1.5 * interQuantileRange
Outliers are more than 1.5 IQR above Q3 and below Q1. Those cutoffs are called fences. The whiskers* are not fences: they indicate the highest and lowest nonoutlier data values.
The calculations below from https://www.d3-graph-gallery.com/graph/boxplot_basic.html are not correct.
Outliers are more than 1.5 IQR above Q3 and below Q1. Those cutoffs are called fences. The whiskers* are not fences: they indicate the highest and lowest nonoutlier data values.
See: https://ggplot2.tidyverse.org/reference/geom_boxplot.html
If you don't want to indicate outliers than just set min and max to the min and max values of the dataset.