SetDataBorderColors — Set the data border colors
$plot->SetDataBorderColors($border
)
SetDataBorderColors
sets the colors used for data borders
on supported plot types.
For plot types bars and
stackedbars,
these are the borders around the individual bars or bar segments in the plot.
For plot types
area,
squaredarea,
stackedarea, and
stackedsquaredarea,
these are outlines of the filled areas.
$border
An array of color values, one for the 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.
If an array is used for $border
, it
must use zero-based sequential integer indexes.
If this function is never called, a default color map is used which sets all data borders to black.
Data borders can be used with plot types bars
and
stackedbars
.
With these plot types, by default,
unshaded plots (SetShading(0)
)
have data borders, and shaded plots have a 3D-look and no data borders.
If you want unshaded plots with no data borders, use
SetDrawDataBorders(FALSE)
to disable
the borders. You can enable data borders on shaded plots with
SetDrawDataBorders(TRUE)
.
Data borders can also be used with plot types
area
,
squaredarea
,
stackedarea
, and
stackedsquaredarea
.
With these plot types, by default, data borders are not drawn.
You can enable data borders for these plot types with
SetDrawDataBorders(TRUE)
.
The data border colors can also be used to outline the color boxes in a legend. See SetLegendColorboxBorders for this option.
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.5, “Custom Data Color Selection”, also controls selection of the color for data borders (if used). Note this does not apply to plot types that do not use the data colors callback.
Starting with PHPlot-6.2.0, data borders are available with
area
and stackedarea
plot types,
and with the new
squaredarea
and stackedsquaredarea
plot types.
Before PHPlot-6.0.0, unshaded bar and stackedbar plots always had data borders, and shaded bar and stackedbar plots never had data borders.
This version of the manual was produced for the
PHPlot Sourceforge project web service site, which requires the logo on each
page.
To download a logo-free copy of the manual, see the
PHPlot project downloads
area.