SetDataBorderColors
Prev | PHPlot Function Reference | Next

## SetDataBorderColors

SetDataBorderColors — Set the rectangle border color on bars and stacked bars

## Synopsis

    $plot->SetDataBorderColors($border)

## Description

`SetDataBorderColors` sets the colors used for the borders of the bars and stacked bars for plot types 'bars' and 'stackedbars'. The borders are only drawn if shading is turned off with SetShading; the default is to draw bars with a drop-shadow for a 3-D look and no borders.

## Parameters

`$border`

  An array of color values, one for the bar border of each data set. Or, a single color value (not an array) to use for all data sets. For other possibilities, see Notes. See Section 3.5, “Colors” for more on color values.

## Notes

If an array is used for `$border`, it must use zero based sequential integer indexes. This is what the PHP manual calls 'the usual integer indices (starting from zero, increasing by one)'.

If this function is never called, and SetShading is called to turn shading off, a default color map is used which sets all data borders to black.

This is only used for plot types 'bars' and 'stackedbars', and only if shading is turned off.

If you want flat (unshaded), borderless bars, call SetShading(0) to turn off the shading, and call SetDataBorderColors with the same color (or color array) that you use with SetDataColors.

If `$border` is not an array, but a single color value, then that color will be used for all data sets. However, the array(r,g,b) notation is not allowed in this case (because it looks like an array of 3 separate color values). You can get around this restriction if you want to specify a single color as an R, G, B array by wrapping the array in another array, for example: `array(array(102, 0, 192))`.

Two special uses of the `$border` argument are available. If the argument is an empty string, or boolean False, the color map is reset to the defaults. This can be used to restore the default color map. If the argument is NULL or missing from the function call, the color map is reset to the defaults, but only if it has not already been set. This is used internal to PHPlot for one-time initialization.

A data colors callback, as described in Section 4.4, “Custom Data Color Selection”, also controls selection of the color for data borders (if used).

Prev | Up | Next
SetCallback | Home | SetDataColors