Legend
class Legend extends ConfigObject (View source)
Properties
string | $position | Position of the legend. | |
string | $alignment | Alignment of the legend. | |
TextStyle | $textStyle | Text style of the legend. |
Methods
Builds the legend object when passed an array of configuration options.
Returns an array representation of the object.
Same as toArray, but without the class name as a key to being multi-dimension.
Details
at line 54
mixed
__construct(
array $config = array())
Builds the legend object when passed an array of configuration options.
in
ConfigObject at line 93
array
toArray(
string $keyName = null)
Returns an array representation of the object.
If passed a label, then the array will be returned with the label as the key.
Called with no label returns an array with the classname as the key.
in
ConfigObject at line 115
array
getValues()
Same as toArray, but without the class name as a key to being multi-dimension.
at line 72
Legend
position(
string $position)
Sets the position of the legend.
Can be one of the following: 'right' - To the right of the chart. Incompatible with the vAxes option. 'top' - Above the chart. 'bottom' - Below the chart. 'in' - Inside the chart, by the top left corner. 'none' - No legend is displayed.
at line 113
Legend
alignment(
string $alignment)
Sets the alignment of the legend.
Can be one of the following: 'start' - Aligned to the start of the area allocated for the legend. 'center' - Centered in the area allocated for the legend. 'end' - Aligned to the end of the area allocated for the legend.
Start, center, and end are relative to the style -- vertical or horizontal -- of the legend. For example, in a 'right' legend, 'start' and 'end' are at the top and bottom, respectively; for a 'top' legend, 'start' and 'end' would be at the left and right of the area, respectively.
The default value depends on the legend's position. For 'bottom' legends, the default is 'center'; other legends default to 'start'.
at line 140
Legend
textStyle(
TextStyle $textStyle)
An object that specifies the legend text style.