Legend
class Legend extends JsonConfig (View source)
Legend ConfigObject
An object containing all the values for the legend which can be passed into the chart's options.
Constants
| TYPE | 
                     Type of JsonConfig object 
  | 
            
Methods
Builds the legend object when passed an array of configuration options.
Shortcut method to set the value of an option and return $this.
Parses the config array by passing the values through each method to check validity against if the option exists.
Details
        at line 50
                            
    
    __construct(
    array $config = array())
    
    Builds the legend object when passed an array of configuration options.
        in 
    JsonConfig at line 64
                            
    mixed
    __get(
    string $option)
    
    Get the value of a set option via magic method.
        in 
    JsonConfig at line 75
                            
    Options
    getOptions()
    
    Gets the Options object for the JsonConfig
        in 
    JsonConfig at line 90
                            
    JsonConfig
    setOption(
    string $option, 
    mixed $value)
    
    Shortcut method to set the value of an option and return $this.
In order to maintain backwards compatibility, ConfigObjects will be unwrapped.
        in 
    JsonConfig at line 106
                            
    
    setOptions(
    array $config)
    
    Parses the config array by passing the values through each method to check validity against if the option exists.
        in 
    JsonConfig at line 275
                            
    array
    jsonSerialize()
    
    Custom serialization of the JsonConfig object.
        at line 71
                            
    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 103
                            
    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 121
                            
    Legend
    textStyle(
    array $textStyleConfig)
    
    An array that specifies the legend text style options.