add legend and scroll