GraphLegend

The graph legend properties.

Example

app = pf.GetApplication()
app:NewProject()
app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])
graph = app.CartesianGraphs:Add()
excitation = app.Models["startup"].Configurations[1].Excitations[1]
excitationTrace = graph.Traces:Add(excitation)

    -- Change properties of the graph legend

graph.Legend.Position = pf.Enums.GraphLegendPositionEnum.CustomPosition
graph.Legend.CustomPositionX = 10
graph.Legend.CustomPositionY = 10

Usage locations (object properties)

The following objects have properties using the GraphLegend object:

Property List

AutoNumberOfColumns
Specifies whether the number of legend columns are chosen automatically. (Read/Write boolean)
CustomPositionX
The custom X coordinate position of the legend. Measured in pixels relative to the top left corner of the graph, with x increasing from left to right. (Read/Write number)
CustomPositionY
The custom Y coordinate position of the legend. Measured in pixels relative to the top left corner of the graph, with y increasing from top to bottom. (Read/Write number)
Font
The font format for the graph legend. (Read only FontFormat)
Frame
The frame format for the graph legend. (Read only FrameFormat)
NumberOfColumns
The number of columns on the legend. (Read/Write number)
Position
The position of the graph legend specified by the GraphLegendPositionEnum, e.g. Top, Bottom, Left, etc. (Read/Write GraphLegendPositionEnum)

Property Details

AutoNumberOfColumns
Specifies whether the number of legend columns are chosen automatically.
Type
boolean
Access
Read/Write
CustomPositionX
The custom X coordinate position of the legend. Measured in pixels relative to the top left corner of the graph, with x increasing from left to right.
Type
number
Access
Read/Write
CustomPositionY
The custom Y coordinate position of the legend. Measured in pixels relative to the top left corner of the graph, with y increasing from top to bottom.
Type
number
Access
Read/Write
Font
The font format for the graph legend.
Type
FontFormat
Access
Read only
Frame
The frame format for the graph legend.
Type
FrameFormat
Access
Read only
NumberOfColumns
The number of columns on the legend.
Type
number
Access
Read/Write
Position
The position of the graph legend specified by the GraphLegendPositionEnum, e.g. Top, Bottom, Left, etc.
Type
GraphLegendPositionEnum
Access
Read/Write