\TbPercentOfTypeGooglePieOperation

## TbPercentOfTypeGooglePieOperation class

Displays a Google visualization pie chart based on the percentage count of type.

Summary

Methods
Properties
Constants
displaySummary()
init()
processValue()
run()
registerClientScript()
$typeTemplate
$template
$types
$value
$label
$column
$chartCssClass
$chartOptions
No constants found
getTotal()
$_total
$data
N/A
No private methods found
No private properties found
N/A

Properties

$typeTemplate

$typeTemplate : string

Type

string — holds the template of each calculated type

$template

$template : string

Type

string — the template to display label and value of the operation at the summary

$types

$types : array

Type

array — hold the configuration of types to calculate. The configuration is set by an array which keys are the value types to count. You can set their 'label' independently. <pre> 'types' => array( '0' => array('label' => 'zeros'), '1' => array('label' => 'ones'), '2' => array('label' => 'twos') </pre>

$value

$value : int

Type

int — the resulted value of operation

$label

$label : string

Type

string — the label of the calculated value

$chartCssClass

$chartCssClass : string

Type

string — the class name of the layer holding the chart

$chartOptions

$chartOptions : array

The options

Type

array

$_total

$_total : integer

Type

integer — holds the total sum of the values. Required to get the percentage.

$data

$data : array

Type

array — the configuration data of the chart

Methods

displaySummary()

displaySummary() : mixed|void

(no phpDoc)

Returns

mixed|void

init()

init()

Widget initialization

Throws

\CException

processValue()

processValue(mixed $value) : mixed

Process the row data value

Parameters

mixed $value

Returns

mixed

run()

run()

Widget's run method

registerClientScript()

registerClientScript()

Registers required scripts

getTotal()

getTotal() : int

Returns the total of types

Returns

int —

holds