class TreeMap extends Chart (View source)

Properties

$type
$label from  Chart
$datatable from  Chart
$deferedRender from  Chart

Methods

__construct( string $chartLabel)

Builds a new chart with a label.

this
customize( array $optionArray)

Sets any configuration option, with no checks for type / validity

from  Chart
setOptions( array $o)

Sets configuration options from array of values

from  Chart
array
getOptions()

Gets the current chart options.

from  Chart
mixed
getOption( string $o)

Gets a specific option from the array.

from  Chart
bool
hasEvents()

Checks if any events have been assigned to the chart.

from  Chart
bool
getEvents()

Checks if any events have been assigned to the chart.

from  Chart
string
getDataTableJson()

Returns a JSON string representation of the datatable.

from  Chart
backgroundColor( BackgroundColor $bc)

The background color for the main area of the chart. Can be either a simple HTML color string, for example: 'red' or '#00cc00', or a backgroundColor object

from  Chart
chartArea( ChartArea $ca)

An object with members to configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends).

from  Chart
colors( array $cArr)

The colors to use for the chart elements. An array of strings, where each element is an HTML color string, for example: colors:['red','#004411'].

from  Chart
datatable( DataTable $d)

Assigns wich Datatable will be used for this Chart.

from  Chart
void
deferedRender( bool $dr)

Set up the chart with no datatable to defer rendering via AJAX

from  Chart
events( array $e)

Register javascript callbacks for specific events.

from  Chart
fontSize( int $fontSize)

The default font size, in pixels, of all text in the chart. You can override this using properties for specific chart elements.

fontName( string $fn)

The default font face for all text in the chart. You can override this using properties for specific chart elements.

from  Chart
height( int $h)

Height of the chart, in pixels.

from  Chart
legend( Legend $l)

An object with members to configure various aspects of the legend. To specify properties of this object, create a new legend() object, set the values then pass it to this function or to the constructor.

from  Chart
string
optionsToJson()

Returns a JSON string representation of the chart's properties.

from  Chart
string
render( string $ei)

Outputs the chart javascript into the page

from  Chart
title( string $t)

Text to display above the chart.

from  Chart
titlePosition( string $tp)

Where to place the chart title, compared to the chart area. Supported values: 'in' - Draw the title inside the chart area.

from  Chart
titleTextStyle( TextStyle $ts)

An object that specifies the title text style. create a new textStyle() object, set the values then pass it to this function or to the constructor.

from  Chart
tooltip( Tooltip $t)

An object with members to configure various tooltip elements. To specify properties of this object, create a new tooltip() object, set the values then pass it to this function or to the constructor.

from  Chart
width( int $w)

Width of the chart, in pixels.

from  Chart
headerColor( string $headerColor)

The color of the header section for each node. Specify an HTML color value.

headerHeight( int $headerHeight)

The height of the header section for each node, in pixels (can be zero).

headerHighlightColor( string $headerHighlightColor)

The color of the header of a node being hovered over. Specify an HTML color value or null; if null this value will be headerColor lightened by 35%

maxColor( string $maxColor)

The color for a rectangle with a column 3 value of maxColorValue.

maxDepth( int $maxDepth)

The maximum number of node levels to show in the current view. Levels will be flattened into the current plane. If your tree has more levels than this, you will have to go up or down to see them. You can additionally see maxPostDepth levels below this as shaded rectangles within these nodes.

maxHighlightColor( string $maxHighlightColor)

The highlight color to use for the node with the largest value in column 3. Specify an HTML color value or null; If null, this value will be the value of maxColor lightened by 35%.

maxPostDepth( int $maxPostDepth)

How many levels of nodes beyond maxDepth to show in "hinted" fashion.

maxColorValue( int $maxColorValue)

The maximum value allowed in column 3. All values greater than this will be trimmed to this value. If set to null, it will be set to the max value in the column.

midColor( string $midColor)

The color for a rectangle with a column 3 value midway between maxColorValue and minColorValue. Specify an HTML color value.

midHighlightColor( string $midHighlightColor)

The highlight color to use for the node with a column 3 value near the median of minColorValue and maxColorValue. Specify an HTML color value or null; if null, this value will be the value of midColor lightened by 35%.

minColor( string $minColor)

The color for a rectangle with the column 3 value of minColorValue.

minHighlightColor( string $minHighlightColor)

The highlight color to use for the node with a column 3 value nearest to minColorValue. Specify an HTML color value or null; if null, this value will be the value of minColor lightened by 35%.

minColorValue( int $minColorValue)

The minimum value allowed in column 3. All values less than this will be trimmed to this value. If set to null, it will be calculated as the minimum value in the column.

noColor( string $noColor)

The color to use for a rectangle when a node has no value for column 3, and that node is a leaf (or contains only leaves). Specify an HTML color value.

noHighlightColor( string $noHighlightColor)

The color to use for a rectangle of "no" color when highlighted. Specify an HTML color value or null; if null, this will be the value of noColor lightened by 35%.

showScale( bool $showScale)

Whether or not to show a color gradient scale from minColor to maxColor along the top of the chart. Specify true to show the scale.

showTooltips( bool $showTooltips)

Whether or not to show tooltips.

fontColor( string $fontColor)

The text color. Specify an HTML color value.

fontFamily( string $fontFamily)

The font family to use for all text.

Details

at line 38
__construct( string $chartLabel)

Builds a new chart with a label.

Parameters

string $chartLabel Label for the chart accessed via the Volcano.

in Chart at line 87
this customize( array $optionArray)

Sets any configuration option, with no checks for type / validity

This is more or less a bandaid to remove the handcuffs from users who want to add options that Google has added, that I have not. I didn't intend to restrict the user to only select options, as the goal was to type check and validate. This method can be used to set any option, just pass in arrays with key value pairs for any setting.

If the setting is an object, per the google docs, then use multi-dimensional arrays and they will be converted upon rendering.

This method will most likely be brought into 3.0 to prevent BC breaks, but I will incorporate the same functionality without the need for the extra customize() method call.

Parameters

array $optionArray

Return Value

this

in Chart at line 136
Chart setOptions( array $o)

Sets configuration options from array of values

You can set the options all at once instead of passing them individually or chaining the functions from the chart objects.

Parameters

array $o

Return Value

Chart

Exceptions

InvalidConfigProperty
InvalidConfigValue

in Chart at line 164
array getOptions()

Gets the current chart options.

Return Value

array

in Chart at line 176
mixed getOption( string $o)

Gets a specific option from the array.

Parameters

string $o Which option to fetch

Return Value

mixed

Exceptions

InvalidConfigValue

in Chart at line 194
bool hasEvents()

Checks if any events have been assigned to the chart.

Return Value

bool

in Chart at line 204
bool getEvents()

Checks if any events have been assigned to the chart.

Return Value

bool

in Chart at line 215
string getDataTableJson()

Returns a JSON string representation of the datatable.

Return Value

string

in Chart at line 229
Chart backgroundColor( BackgroundColor $bc)

The background color for the main area of the chart. Can be either a simple HTML color string, for example: 'red' or '#00cc00', or a backgroundColor object

Parameters

BackgroundColor $bc

Return Value

Chart

in Chart at line 245
Chart chartArea( ChartArea $ca)

An object with members to configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends).

Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.

Parameters

ChartArea $ca

Return Value

Chart

in Chart at line 259
Chart colors( array $cArr)

The colors to use for the chart elements. An array of strings, where each element is an HTML color string, for example: colors:['red','#004411'].

Parameters

array $cArr

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 285
Chart datatable( DataTable $d)

Assigns wich Datatable will be used for this Chart.

If a label is provided then the defined Datatable will be used. If called with no argument, or the chart is attempted to be generated without calling this function, the chart will search for a Datatable with the same label as the Chart.

Parameters

DataTable $d

Return Value

Chart

in Chart at line 301
void deferedRender( bool $dr)

Set up the chart with no datatable to defer rendering via AJAX

Parameters

bool $dr

Return Value

void

Exceptions

InvalidElementId

in Chart at line 327
Chart events( array $e)

Register javascript callbacks for specific events.

Valid values include: [ animationfinish | error | onmouseover | onmouseout | ready | select ] associated to a respective pre-defined javascript function as the callback.

Parameters

array $e Array of events associated to a callback

Return Value

Chart

Exceptions

InvalidConfigValue

at line 328
Chart fontSize( int $fontSize)

The default font size, in pixels, of all text in the chart. You can override this using properties for specific chart elements.

Parameters

int $fontSize

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 389
Chart fontName( string $fn)

The default font face for all text in the chart. You can override this using properties for specific chart elements.

Parameters

string $fn

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 409
Chart height( int $h)

Height of the chart, in pixels.

Parameters

int $h

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 432
Chart legend( Legend $l)

An object with members to configure various aspects of the legend. To specify properties of this object, create a new legend() object, set the values then pass it to this function or to the constructor.

Parameters

Legend $l

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 442
string optionsToJson()

Returns a JSON string representation of the chart's properties.

Return Value

string

in Chart at line 459
string render( string $ei)

Outputs the chart javascript into the page

Pass in a string of the html elementID that you want the chart to be rendered into.

Parameters

string $ei The id of an HTML element to render the chart into.

Return Value

string Javscript code blocks

Exceptions

InvalidElementId

in Chart at line 474
Chart title( string $t)

Text to display above the chart.

Parameters

string $t

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 497
Chart titlePosition( string $tp)

Where to place the chart title, compared to the chart area. Supported values: 'in' - Draw the title inside the chart area.

'out' - Draw the title outside the chart area. 'none' - Omit the title.

Parameters

string $tp

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 526
Chart titleTextStyle( TextStyle $ts)

An object that specifies the title text style. create a new textStyle() object, set the values then pass it to this function or to the constructor.

Parameters

TextStyle $ts

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 542
Chart tooltip( Tooltip $t)

An object with members to configure various tooltip elements. To specify properties of this object, create a new tooltip() object, set the values then pass it to this function or to the constructor.

Parameters

Tooltip $t

Return Value

Chart

Exceptions

InvalidConfigValue

in Chart at line 555
Chart width( int $w)

Width of the chart, in pixels.

Parameters

int $w

Return Value

Chart

Exceptions

InvalidConfigValue

at line 73
TreeMap headerColor( string $headerColor)

The color of the header section for each node. Specify an HTML color value.

Parameters

string $headerColor

Return Value

TreeMap

at line 85
TreeMap headerHeight( int $headerHeight)

The height of the header section for each node, in pixels (can be zero).

Parameters

int $headerHeight

Return Value

TreeMap

at line 99
TreeMap headerHighlightColor( string $headerHighlightColor)

The color of the header of a node being hovered over. Specify an HTML color value or null; if null this value will be headerColor lightened by 35%

Parameters

string $headerHighlightColor

Return Value

TreeMap

at line 112
TreeMap maxColor( string $maxColor)

The color for a rectangle with a column 3 value of maxColorValue.

Specify an HTML color value.

Parameters

string $maxColor

Return Value

TreeMap

at line 128
TreeMap maxDepth( int $maxDepth)

The maximum number of node levels to show in the current view. Levels will be flattened into the current plane. If your tree has more levels than this, you will have to go up or down to see them. You can additionally see maxPostDepth levels below this as shaded rectangles within these nodes.

Parameters

int $maxDepth

Return Value

TreeMap

at line 142
TreeMap maxHighlightColor( string $maxHighlightColor)

The highlight color to use for the node with the largest value in column 3. Specify an HTML color value or null; If null, this value will be the value of maxColor lightened by 35%.

Parameters

string $maxHighlightColor

Return Value

TreeMap

at line 156
TreeMap maxPostDepth( int $maxPostDepth)

How many levels of nodes beyond maxDepth to show in "hinted" fashion.

Hinted nodes are shown as shaded rectangles within a node that is within the maxDepth limit.

Parameters

int $maxPostDepth

Return Value

TreeMap

at line 170
TreeMap maxColorValue( int $maxColorValue)

The maximum value allowed in column 3. All values greater than this will be trimmed to this value. If set to null, it will be set to the max value in the column.

Parameters

int $maxColorValue

Return Value

TreeMap

at line 183
TreeMap midColor( string $midColor)

The color for a rectangle with a column 3 value midway between maxColorValue and minColorValue. Specify an HTML color value.

Parameters

string $midColor

Return Value

TreeMap

at line 198
TreeMap midHighlightColor( string $midHighlightColor)

The highlight color to use for the node with a column 3 value near the median of minColorValue and maxColorValue. Specify an HTML color value or null; if null, this value will be the value of midColor lightened by 35%.

Parameters

string $midHighlightColor

Return Value

TreeMap

at line 211
TreeMap minColor( string $minColor)

The color for a rectangle with the column 3 value of minColorValue.

Specify an HTML color value.

Parameters

string $minColor

Return Value

TreeMap

at line 225
TreeMap minHighlightColor( string $minHighlightColor)

The highlight color to use for the node with a column 3 value nearest to minColorValue. Specify an HTML color value or null; if null, this value will be the value of minColor lightened by 35%.

Parameters

string $minHighlightColor

Return Value

TreeMap

at line 239
TreeMap minColorValue( int $minColorValue)

The minimum value allowed in column 3. All values less than this will be trimmed to this value. If set to null, it will be calculated as the minimum value in the column.

Parameters

int $minColorValue

Return Value

TreeMap

at line 253
TreeMap noColor( string $noColor)

The color to use for a rectangle when a node has no value for column 3, and that node is a leaf (or contains only leaves). Specify an HTML color value.

Parameters

string $noColor

Return Value

TreeMap

at line 267
TreeMap noHighlightColor( string $noHighlightColor)

The color to use for a rectangle of "no" color when highlighted. Specify an HTML color value or null; if null, this will be the value of noColor lightened by 35%.

Parameters

string $noHighlightColor

Return Value

TreeMap

at line 280
TreeMap showScale( bool $showScale)

Whether or not to show a color gradient scale from minColor to maxColor along the top of the chart. Specify true to show the scale.

Parameters

bool $showScale

Return Value

TreeMap

at line 292
TreeMap showTooltips( bool $showTooltips)

Whether or not to show tooltips.

Parameters

bool $showTooltips

Return Value

TreeMap

at line 304
TreeMap fontColor( string $fontColor)

The text color. Specify an HTML color value.

Parameters

string $fontColor

Return Value

TreeMap

at line 316
TreeMap fontFamily( string $fontFamily)

The font family to use for all text.

Parameters

string $fontFamily

Return Value

TreeMap