change #16

move the legend and hide the legend when it shows the chart