OnGraphDrawItem
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)
"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.
Uses
You might want your custom OnGraphDraw to run when viewing a Bands graph. Then your OnGraphDraw expression might have this:
where DoMyDrawing is your UDF that draws something.
See Also
Comments
Enable comment auto-refresher