KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Dont show google chart data #507

Open augusto opened this topic on on Nov 1, 2018 - 1 comments

augusto commented on Nov 1, 2018

Im having a problem with google reports, im trying to make a linechart report but its only appears a white page!!!

cam you help me?? thanks in advance!

<<index.php>>
<?php

    require_once "EmployeeList.php";

    $report = new EmployeeList;

    $report->run()->render();
	

?>
<<EmployeeList.view.php>>

<?php
    use \koolreport\widgets\google\LineChart;
?>

	<?php 
	
        LineChart::create(array(
            "dataStore"=>$this->dataStore("Claro"),
            "columns"=>array(
                "REF"=>array(
                    "label"=>"REF",
                    "type"=>"text"
                ),
                "P3G"=>array(
                    "label"=>"P3G",
                    "type"=>"number",
                    "prefix"=>"$"
                )        	
            ),
            "options"=>array(
                "title"=>"Sale Performance"
            )
        ));
    ?>
<<EmployeeList.php>>

<?php

require_once "C:/wamp/www/Garajes/koolreport/autoload.php";

 

class EmployeeList extends \koolreport\KoolReport

{

    function settings()

    {

        return array(

            "dataSources"=>array(

                "mydata"=>array(

                    'connectionString' => 'mysql:host=localhost;dbname=csv_db',

                    'username' => 'root',

                    'password' => '',

                    'charset' => 'utf8',

               )

            )

        );

    }

    function setup()

    {

        $this->src("mydata")

        ->query("SELECT * FROM  `garajes_amba_final`  WHERE P3G = 'CLARO' " )

        ->pipe($this->dataStore("Claro"));

    }

}
KoolReport commented on Nov 5, 2018

Your code seems fine or I have not spot any visible error, could you please check if is there any javascript error? You may view it through browser console.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

None