KoolTreeGrid - Great PHP TreeGridKoolTreeGrid - Great PHP TreeGridFullVersion 1.0.0.0 released on 05/22/2014

Data Types - KoolTreeGrid using array data

PropertyDefault ValueExample ValueTypeDescription
  • KoolChart
    • Id
    • Width
    • Height
    • scriptFolder
    • Transitions
    • BackgroundColor
    • NumberFormat
    • DecimalNumber
    • DecimalSeparator
    • ThousandSeparator
    • Padding
    • Pad
    • BarGapRatio
    • CategoryGapRatio
    • FontColor
    • FontFamily
    • FontSize
    • FontStyle
    • FontWeight
    • Title
      • Text
      • Appearance
    • Legend
      • Appearance
    • PlotArea
      • Appearance
      • XAxis
      • YAxis
      • ListOfSeries
    • ClientEvents
  Object 
<user input>StringChart's id
800NumberChart's width
500NumberChart's height
nullStringPath to KoolChart's control
trueBoolEnable chart's transition effects or not
#ffffffStringSet chart's background color
trueBoolSet whether number in series and axis will be formatted
0NumberNumber of numbers after decimal point
.StringDecimal point
,StringThousand separator
20NumberSet's one value for chart's top, bottom, left and right padding
nullArraySet's each value for chart's top, bottom, left and right padding
1/2NumberSet's gap over bar width ratio
 NumberSet's gap over category width ratio
#3c4c30StringSet chart's font color
Arial,Helvetica,sans-serifStringSet chart's font family
12pxStringSet chart's font size
normalStringSet chart's font style
normalStringSet chart's font weight
  ObjectChart's title
Chart TitleStringTitle's text
  ObjectTitle's appearance
  ObjectChart's legend
  ObjectTitle's appearance
  ObjectChart's plot area
  ObjectPlot area's appearance
  ObjectPlot area's X axis
  ObjectPlot area's Y axis
<empty array> ArrayArray of chart series
<empty array> ObjectChart's client events

Description & Sample code

To use an table array as data for KoolTreeGrid, you must provide an id field and parent field for each row which is used to construct the tree relation between rows.
A meta field is optional that will provide options like row expanding or not, displaying type for each cell, etc.
For example:
  
    $arr = array(
        array('id' => '1', 'parent' => '' , 'type' => 'Captain', 'level' => '1'),
        array('id' => '2', 'parent' => '1', 'type' => 'Crew member', 'level' => '2'),
        array('id' => '3', 'parent' => '2', 'type' => 'Apprentice', 'level' => '3'),
    );
    $treeGrid = KoolTreeGrid::newTreeGrid(array(
        'ArrayData' => $arr,
        'idField' => 'id',
        'parentField' => 'parent',
        'columns' => array(
            array(
                'field' => 'type',
            ),
            array(
                'field' => 'level',
            ),
        ),
    ));