This section defines the currently available callback names. A callback name is also called a reason.
Most of the callbacks currently available are drawing callbacks, activated during the graph drawing process started by DrawGraph. By convention, a drawing callback occurs right after the event which it names. For example, the draw_titles callback will be called after drawing the plot titles.
Debug callbacks are for use when developing and debugging PHPlot itself. Needless to say, their use for other purposes is discouraged.
The following table lists the available callback reasons.
Reason Name: | Calling Point: | Extra Parameters: | Notes: |
---|---|---|---|
draw_setup | After all setup, before drawing anything. | (None) | Anything drawn here will be covered by the background. |
draw_image_background | After drawing the image backgrounds and border. | (None) | |
draw_plotarea_background | After drawing the plot area background. | (None) | |
draw_titles | After drawing the plot title, X and Y titles. | (None) | Called even if no titles were set. |
draw_axes | After drawing the X and Y axis and grid lines. | (None) | Not called for pie charts. |
draw_graph | After drawing the body of the graph. | (None) | |
draw_border | After drawing the plot area border. | (None) | Not called for pie charts. |
draw_legend | After drawing the legend, if legend is enabled. | (None) | Not called if no legend was set. |
debug_textbox | Just before drawing any text. | $px, $py, $bbox_width, $bbox_height | Provides access to the orthogonal bounding box position and size for the text string. |
debug_scale | Called at end of many scale calculation functions. | Function name, then an array of variable name => value | For displaying intermediate values in margin and scale calculations. |