DifferenceColumn

Introduction #

DifferenceColumn is a process to add a differential column based on an existed column.

Example #

<?php
class MyReport extends \koolreport\KoolReport
{
    public function setup()
    {
        ...
        ->pipe(new \koolreport\processes\DifferenceColumn(array(
            "diff" => "dollar_sales",
        )))
        ...
    }
}

Code explanation:

In the above example, we create a column called "diff" value of which is difference between the "dollar_sales" column value of the current data row and the previous one.

Get started with KoolReport

KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.