Only display the legend if there is one.