|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home ChartPack Plot3D Events OnBeforeDrawScaleLabel|
|See also: Tp3BeforeDrawScaleLabelEvent, TP3ScaleKind|
The events OnDataRendered and OnBeforeDrawScaleLabel provide a hook for adding user defined graphics to a surface plot. While the event OndataRendered can be used to draw special graphics on the chart (on top of the data and the scales), the event OnBeforeDrawScaleLabel is triggered immediately before a label of the scale is going to be rendered and allows to modify the text of this label.
The variable parameter Canvas provides access to the canvas of the data area. The parameter ScaleType specifies the kind of scale the label belongs to. The variable parameter CurrentTickLabel can be adjusted according to the requirements of the program (e.g. to append a measurement unit to it). The parameters ChartX and ChartY specify the position of the label (in pixel coordinates).
Please note that the state of the canvas (e.g. the color of its pen, or the fill mode of the brush) depends on the graphics elements drawn before.