4.9 FAQ-368 How do I modify the legend?
Last Update: 1/16/2017
The legend is an ordinary text object with the name legend. This text object uses a special syntax to display plot symbols and text. The raw text may look something like:
This is what you would see if you were to right-click on the legend object and choose Properties.
For an explanation of syntax and legend customization within the user-interface, see the legend customization discussion in Graph Legends and see the graph legend-related FAQs in the Text Labels & Legends section.
To modify the graph legend programmatically:
You can directly change the text in the legend by addressing the text property of the object named legend:
legend.text$ = Test
You can use the legendupdate X-Function to change the way the %(#) is interpreted. For example:
legendupdate mode:=lname; // display long name
legendupdate mode:=7 custom:=@WS; // display sheet name, customized option
Other Substitution notations can also be used for the legend, the X and Y axis titles, or ant text object. Please refer to Text Label Options for more details.
Keywords:object, control, programming, substitution