KoolReport's Forum

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

Area Chart Problem #944

Open Sowmya opened this topic on on Jun 25, 2019 - 2 comments

Sowmya commented on Jun 25, 2019

Hi KoolReport team,

            I'm Sowmya. I'm KoolReport Pro User. Here I have a query about "Line Chart" or "Area Chart". I want to generate Quarter Report  for last 3 months.

So In My Database I have Invoice value from 0 to 100000000, Where as in my graph it takes 0,50000000,100000000 values only on Y-Axis, on X-Axis I have "MONTH" "My graph is most Clumsy.... I want graph clearly for Each Month in Different Units of Organization" Can you please help me out this problem. I was facing this issue from last 2 days. Today I have to give report to my Boss. Please Please help out..... Here I want to attach my View also, but it is not attached... and please also tell me how to attach a file is gratitude towards to you....

                                          Thank You In advance....
David Winterburn commented on Jun 26, 2019

Hi Sowmya,

Please try the Cube process like this:

//MyReport.php

$this->src("sales")
->query("select month, unit, sale from myTable")
->pipe(new \koolreport\cube\Cube([
    "row" => "unit",
    "column" => "month",
    "sum" => "sale"
]))
->pipe($this->dataStore('sales')); 

//MyReport.view.php

        \koolreport\widgets\google\LineChart::create(array(
                "dataSource" => $this->dataStore('sales')
            ));

Thanks!

Sowmya commented on Jun 26, 2019

Hi David Winterburn, I tried CUBE process, But no use. It gives me error message. My column names are undefined.... Actually my data in the format of

 CostCenter            MonName    MonField    MonYear        InvValue
Manufacturing	        April	    4	       2019	    ********
Rental	                April	    4	       2019	    ********
Service	                April	    4	       2019	    ********
Spares	                April     4	       2019	    *********
Traded	                April	    4	       2019	    0	           

*. Like this I have " May, June" Invoices are there in my Database.... This data I stored in a "view(Ms SQL Server)".

My Code is ::

($this->src('invoice')
		->query("select MonName,CostCentre,InvoiceValue
			       from vw_MonthWiseSalesSummeries
		               order by MonField,MonName,CostCentre")
		
	    ->pipe(new Cube(array(
            "row" => "MonName",
            "column" => "CostCentre",
            "sum" => "InvoiceValue"
        )))
        ->pipe($this->dataStore('Quarter_Sales'));
)

Now I want to generate Koolreport of "Area or Line chart or Bar chart......"

Kindly Please give the solution as early as possible. Bacause I'm struggling with this task from last 3days. I have to submit this task. Here I'm only Koolreport user. Please support me.

                             Thank you so much for your reply.....

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
solved

Cube