Adding functionality to detect a chart minimum