Add a function of drawing average line and label.