tried moving most histogram variables outside of the draw chart function - but now y-axis range is wrong
updated y axis variables to update properly