Waterfall

This example shows how to draw beautiful Waterfall

A waterfall chart is a form of data visualization that helps in understanding the cumulative effect of sequentially introduced positive or negative values. These intermediate values can either be time based or category based. The waterfall chart is also known as a flying bricks chart or Mario chart due to the apparent suspension of columns (bricks) in mid-air. Often in finance, it will be referred to as a bridge.

<?php

require_once "../../../load.koolreport.php";
require_once "MyReport.php";

$report = new MyReport;
$report->run()->render();
<?php

class MyReport extends \koolreport\KoolReport
{

}
<?php
    use \koolreport\d3\Waterfall;
?>
<div class="report-content" title="">
    <div class="text-center">
        <h1>Waterfall</h1>
        <p class="lead">
            This example shows how to draw beautiful Waterfall
        </p>
    </div>

    <div style="margin-bottom:50px;">
    <?php
        Waterfall::create([
            "title"=>"Profit path",
            "dataSource"=>[
                ["name"=>"Product Revenue","amount"=>420000],
                ["name"=>"Services Revenue","amount"=>210000],
                ["name"=>"Fixed Costs","amount"=>-170000],
                ["name"=>"Variable Costs","amount"=>-140000],
            ],
            "columns"=>[
                "name",
                "amount"=>[
                    "format"=>"function(d){
                        return `\${Math.round(d / 1000)}k`;
                    }"
                ]
            ],
            "yAxis"=>[
                "prefix"=>"$",
            ],
            "summary"=>[
                "Total Revenue"=>2,
                "Profit"=>"end"
            ],
        ]);
        ?>

    </div>

</div>

What People Are Saying

"KoolReport helps me very much in creating data report for my corporate! Keep up your good work!"
-- Alain Melsens

"The first use of your product. I was impressed by its easiness and powerfulness. This product is a great and amazing."
-- Dr. Lew Choy Onn

"Fantastic framework for reporting!"
-- Greg Schneider

Download KoolReport Get KoolReport Pro