GaugeCard

The example shows how to use GaugeCard of Amazing Theme

Revenue
Cost

Introduction

This example shows how to use Amazing Theme's GaugeCard. The card is extremely useful when you want to show progress of your project, your revenue compared to last period for example. The gauge card has 5 color preset prumary, success, warning, danger and info that you can use instantly.

To make GaugeCard is easy:

<?php
\koolreport\amazing\GaugeCard::create(array(
    "title"=>"Cost",
    "value"=>4000,
    "preset"=>"danger",
    "baseValue"=>5000,
    "format"=>array(
        "value"=>array(
            "prefix"=>"$"
        )
    ),
    "cssClass"=>array(
        "positive"=>"text-danger",
    ),
));
?>

The "value" is the main value to show. The "baseValue" is the value that used to compared, it could be the previous sale amount.

<?php
require_once "MyReport.php";

$report = new MyReport;
$report->run()->render();
<?php
require_once "../../../load.koolreport.php";

class MyReport extends \koolreport\KoolReport
{
    use \koolreport\amazing\Theme;
    public function settings()
    {
        $config = include "../../../config.php";

        return array(
            "dataSources"=>array(
                "automaker"=>$config["automaker"]
            )
        );
    }
}
<?php
    use \koolreport\amazing\GaugeCard;
?>
<div class="report-content" style="padding:15px">
    <div class="text-center">
        <h1>GaugeCard</h1>
        <p class="lead">
            The example shows how to use GaugeCard of Amazing Theme
        </p>
    </div>
    
    <div class="row">
        <div class="col-md-4 offset-md-2">
        <?php
        \koolreport\amazing\GaugeCard::create(array(
            "title"=>"Revenue",
            "value"=>7500,
            "preset"=>"success",
            "baseValue"=>10000,
            "format"=>array(
                "value"=>array(
                    "prefix"=>"$"
                )
            ),
        ));
        ?>
        </div>
        <div class="col-md-4">
        <?php
        \koolreport\amazing\GaugeCard::create(array(
            "title"=>"Cost",
            "value"=>4000,
            "preset"=>"danger",
            "baseValue"=>5000,
            "format"=>array(
                "value"=>array(
                    "prefix"=>"$"
                )
            ),
            "cssClass"=>array(
                "positive"=>"text-danger",
            ),
        ));
        ?>
        </div>
    </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