Shapes? Lines? How many shapes will be in the legend?
A good way to do this is make a box and add your legends to the diagram if
you plan on printing it. The reply above is catered to shapes in your diagram
but cant be printed nor do they have any information along with them