Legend objects represent each legend in a PopChart. Though there is usually only one legend, there can be any number of Legend objects in an appearance file. Each Legend object has its own name, data, and formatting options.
Note: For this section, our examples assume that the Legend object that we are using has the default name of legend. However, be aware that your Legend object is not always named legend. If such cases, you should use the object name in place of legend.