class Slice extends ConfigObject (View source)

Properties

string $color The slice fill color.
string $offset Offset amount.
TextStyle $textStyle Slice text style.

Methods

mixed
__construct( array $config = array())

Builds the slice object with specified options.

array
toArray( string $keyName = null)

Returns an array representation of the object.

array
getValues()

Same as toArray, but without the class name as a key to being multi-dimension.

color( string $color)

The color to use for this slice. Specify a valid HTML color string.

offset( float $offset)

How far to separate the slice from the rest of the pie.

textStyle( TextStyle $textStyle)

Overrides the global pieSliceTextSlice for this slice.

Details

at line 54
mixed __construct( array $config = array())

Builds the slice object with specified options.

Parameters

array $config Array of options.

Return Value

mixed

Exceptions

InvalidConfigValue
InvalidConfigProperty

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.

Parameters

string $keyName Key name to be applied to generated array.

Return Value

array Assoc. array of the options of the object.

in ConfigObject at line 115
array getValues()

Same as toArray, but without the class name as a key to being multi-dimension.

Return Value

array Array of the options of the object.

at line 66
Slice color( string $color)

The color to use for this slice. Specify a valid HTML color string.

Parameters

string $color

Return Value

Slice

Exceptions

InvalidConfigValue

at line 89
Slice offset( float $offset)

How far to separate the slice from the rest of the pie.

from 0.0 (not at all) to 1.0 (the pie's radius).

Parameters

float $offset

Return Value

Slice

Exceptions

InvalidConfigValue

at line 110
Slice textStyle( TextStyle $textStyle)

Overrides the global pieSliceTextSlice for this slice.

Parameters

TextStyle $textStyle A valid textStyle object.

Return Value

Slice