SetLegendColorboxBorders
Prev | PHPlot Function Reference | Next

## SetLegendColorboxBorders

SetLegendColorboxBorders — Control the borders around color boxes in the legend

## Synopsis

    $plot->SetLegendColorboxBorders([$cbbmode])

## Description

`SetLegendColorboxBorders` controls the appearance of the borders around the color boxes in the legend. The borders can be off, on using the Text color, or on using the set of Data Border colors.

## Parameters

`$cbbmode`

  Optional string indicating the color mode for the legend color boxes. If supplied, it must be one of the following values:

  Mode | Description
  --- | ---
  none | No color box borders are drawn
  textcolor | Use the Textcolor for all legend color boxes
  databordercolor | Use successive entries from the Data Border Colors array for each legend color box

  If omitted, `textcolor` is used.

## Notes

By default, the color boxes are drawn using the text color set with SetTextColor, which defaults to black.

If the color box border mode is `databordercolor`, then the colors set with SetDataBorderColors are used. (These are the same colors used as borders for the bars in a bar chart.) The top line (or bottom line, if SetLegendReverse(True) is used) in the legend will have a color box using the first data color (see SetDataColors) and a border using the first data border color, etc.

## History

This function was added in PHPlot-6.0.0. In earlier releases, the legend color boxes always had a border using the text color.

Prev | Up | Next
SetLegendBgColor | Home | SetLegendPixels