GraphTitleExpr


New to Analytica 6.0

Attribute GraphTitleExpr

This attribute holds a custom graph title that appears at the top of a graph above the graph itself. When this attribute is not present, a title is not normally shown, with the main variable title often appearing in an axis title, etc. You can access this attribute in edit mode by right-clicking on a graph and selecting Change graph title.

The contents of the attribute is an expression, so a literal textual title must have quotes around it. The expression can compute the title.

The expression has access to the following local variables that are provided to it as the graph is rendering:

  • "info"
  • "phase"
  • "roles"

These variables are the same as for OnGraphDraw, and you should consult the page for OnGraphDraw for information on these.

You may want a title that adapts to the uncertainty view or graph pivot, and hence, it is useful to be able to use a computed title. The result of the expression should be either text (the title) or Null for no title.

Examples

Adapting to view mode

The following expression includes the uncertainty view mode in the title:

info[OnGraphDrawItem='ViewMode'] & " for " & (title of self)

Including a Slicer value in the title

Local slicers := #info[ OnGraphDrawItem='SlicerPositions'];
Local pos := slicers[.Slicer=Handle(Metric)];
If pos<>Null Then f"Cost for {Slice(Metric,pos)}" Else "Cost for Rider and Driver"

Download this example: Computed Graph Title includes Slicer value.ana

Notice how the graph title changes in these images as the slicer for the Metric index is changed:

Computed graph title Rider.png Computed graph title Driver.ana

See Also

Comments


You are not allowed to post comments.