08-11-2006 01:04 PM
08-11-2006 02:17 PM
Howdy gtoph,
An awesome example to look at is the graphlegend example in the Example Finder (Help >> Example Finder >> Index (type "graphs")). This example demonstrates how to programmatically set graph legend options such as color, position, size, and sample plot display.
To set the color of the legend text, you could use the statement
SetPlotAttribute (panel, PANEL_GRAPH, plotHandle, ATTR_PLOT_LG_TEXT_COLOR, "Color");
In this case to set that specific color property, you will need to reference the actual plot on the graph control you want to change (plotHandle). Some legend settings such as the visibility are accessed via the actual graph control. For example, to set the legend visibility, you would say
SetCtrlAttribute (panel, PANEL_GRAPH, ATTR_LEGEND_VISIBLE, "0 or 1")
Hope this helps!
Best Regards,
08-11-2006 02:45 PM