in-line template for legend