Is it possible to show on the legend the true minimum and maximum?

I’d like to set the minimum and maximum, in which case the legend currently shows the chosen minimum and maximum, not the true minimum and maximum of the scalar field.