This system index is used be the local variable info in the OnGraphDraw attribute.

The GraphToCanvasCoord function knows how to use information contained in «info».

System Index OnGraphDrawItem

Index that lists the the fields of «info» in OnGraphDraw. The items (members of «info») are as follows:

  • "Width": The total width of the graph drawing surface in pixels. Includes the plot area, areas for axis titles, labels, and for keys.
  • "Height": The total height of the graph drawing surface in pixels.
  • "PlotAreaLeft", "PlotAreaTop", "PlotAreaWidth", "PlotAreaHeight": The rectangle inside the axes where data is plotted.
  • "ChartType": The line type selected in graph setup. One of:
    • "Line"
    • "Symbol"
    • "Dot"
    • "LineSymbol"
    • "Step"
    • "Bar"
  • "ViewMode": Which uncertainty view is being depicted. One of the following values:
    • "Mid"
    • "Mean"
    • "Sample"
    • "PDF"
    • "CDF"
    • "Statistics"
    • "Bands"
  • "Result": A Handle to the variable whose result is being depicted. (revisit: This might not be correct.)
  • "Phase": Same as the local Phase variable.
    • 1 = before layout (opportunity to suppress default graph)
    • 2 = before drawing (opportunity to rescale axes)
    • 4 = after axes, before data (opportunity to replace plot using same axis scaling)
    • 8 = after fully drawn (opportunity to annotate over a graph)
  • "DepictedIndexes": A reference to a list of handles to the indexes that vary on the graph. This includes indexes assigned to graphing roles and slicers set to All.
  • "SlicerPositions": A reference to a 1-D array. The index of the array is a local index named Slicer, whose elements are handles to the indexes that are slicers for the graph and are set to a specific value (i.e., those set to «Totals» or «All» are not in this list). The value in the array is the 1-based integer position of the selected value. The index might have length zero.
  • "SlicersAtTotal": A reference to a list of handles to the slicer indexes that are set to «Totals».
  • "SlicersAtAll": A reference to a list of handles to the slicer indexes that are set to «All».
  • "SwapXY": Boolean, true when the vertical axis in the independent axis (i.e., X).
  • "BarOverlap": The bar overlap (specified in Graph Setup). 0% is usual, Tornados often use 100% overlap, and stacked bar charts have 100% overlap.

The following bar graph metrics are only available in «info» after the bars have rendered -- i.e., only in phase=8. Before that they are null.

  • "BarWidth":
  • "BarWidthPix": Bar width in pixels
  • "CategoryGap":
  • "CategoryGapPix": The gap between bars in pixels.


You might want your custom OnGraphDraw to run when viewing a Bands graph. Then your OnGraphDraw expression might have this:

If info[OnGraphDrawItem='ViewMode'] = "Bands" Then DoMyDrawing(canv, info, roles);

where DoMyDrawing is your UDF that draws something.

See Also


You are not allowed to post comments.