4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4

This index is used by the roles variable in OnGraphDraw, and indexes the information about a graphing role filler dimension. Also, any changes to roleChanges in OnGraphDraw (usually in phase=2) needs to also have this index (and GraphingRole).

Index GraphFillerInfo

The roles variable in OnGraphDraw and OnGraphClick contains information about the graphing dimensions depicted on a graph. Roles is indexed by GraphingRole and by GraphFillerInfo. Each graphing role may by filled by a graphing dimension (either an index or a value), and information about that graphing dimension is indexed by GraphFillerInfo.

The filler information that is provided (the elements of GraphFillerInfo) are as follows:

  • "Type": The type of this graphing dimension, either "Index", "Value" or Null.
  • "Source": Usually a Handle to the variable that corresponds to this dimension. This will be true for an index dimension, the main result, and a comparison variable. Less commonly, a filler may be the result of a computed expression, in which case this contains a parsed expression.
  • "Slice index": The comparison index, if there is one.
  • "Slice position": The 1-based position along the comparison index of this graphing dimension.
  • "Categorical": Boolean, true when this graphing dimension is categorical (i.e., not continuous).
  • "Autoscale": Boolean, true when axis scale is determined by the data, false when manually scaled ("zoomed").
  • "Min", "Max": The smallest and largest values in an axis scale.
  • "Log scale": True when the axis uses a log-scale.
  • "Log abs min": When the axis uses a log scale, the smallest absolute value of non-zero data.
  • "Rounding unit": (for internal use)
  • "Reversed": Boolean. True when the order of the axis values or key values are reversed.
  • "Labels": The individual labels in a categorical dimension. For a categorical value dimension, this will be the set of unique values, in the order determined by the domain and other factors.
  • "Title": The key or axis title. This can be changed in «roleChanges» to a computed value in the before drawing phase.
  • "Value": A reference to the computed value for this dimension (i.e., the data being depicted). In general, this is an array that may have multiple indexes.
  • "ClickCoord": (New to Analytica 6.0) This field is used only in OnGraphClick. It contains the value (in the units of this value or index) determined by the mouse click. For example, the 'X axis' role has the x-location of the click.


Logic in OnGraphDraw may want to access the values of one or more graphing dimensions. For example, to get the actual values of data points depicted in the X axis role, use:

#roles[GraphingRole='X axis', GraphFillerInfo='Value']

Note that you should protect this so you don't get an error if there no graphing dimension is filling the given role. So, for example, if you use the values of the Color role, test that it is filled using something like

If roles[GraphingRole='Color', GraphFillerInfo='Type'] <> Null Then (
Local colorValues = #roles[GraphingRole='Color', GraphFillerInfo='Value'];

In many plots, the "main" result value is used for the Y axis role, and hence would be accessed as

#roles[GraphingRole='Y axis', GraphFillerInfo='Value']

See Also


You are not allowed to post comments.