add height and legend attributes