SetYDataLabelPos

SetYDataLabelPos — Position and control Y data labels

Synopsis

$plot->SetYDataLabelPos($ydlp)
    

Description

SetYDataLabelPos determines if and where Y data labels are drawn. Currently, Y data labels are only implemented for 'bars' plot types. The Y data label shows the Y value above each bar. This is shown in Example 5.19, “Bar Chart with Data Labels”.

Parameters

$ydlp

A string indicating the desired position for the Y data labels. The value 'plotin' enables Y data labels for bar charts. The value 'none' disables the Y data labels. These are the only currently supported values.

Notes

The default is not to draw Y data labels. These labels are only available for plot type 'bars'. If the position is set to 'plotin', the labels will be drawn above the bars (or below the bars, for negative values). This works best if the values are short enough to fit.

The Y data label feature for bar graphs was added to PHPlot-5.0rc3.