A smarter implementation of the histogram controls.