KoolReport's Forum

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

Google chart height is shrunk #1898

Open ankit raj opened this topic on on Feb 11, 2021 - 1 comments

ankit raj commented on Feb 11, 2021

Hi , I am using google chart to display data and the height seems to be shrunk and not taking the full height unless i do a resize.

This is my code:

  print('<div class = "col-lg-4 col-md-4 col-sm-12">
<div class="card">');
        \koolreport\widgets\google\ComboChart::create(array(
            "title"=>$title,
            "name"=>$id_array[$opt-1],
            "dataSource"=>$data,
            "colorScheme"=>$color_scheme,
            "columns"=>array(
                "category",
                "value"=>array(
                    "label"=>$text_label[$opt]['first'],
                    "type"=>"number",


                ),

                "avg"=>array(
                    "label"=>$text_label[$opt]['second'],
                    "type"=>"number",
                    "chartType"=>"line",
                    "annotation"=>function($row)
                    {
                        return $row["avg"];
                    }

                ),
            ),
            "options"=>array(
                "series"=> array(
                    0=> array("targetAxisIndex"=> 0),
                    1=> array("targetAxisIndex"=> 1),
                ),
                "vAxes"=>array(
                    0=> array("title"=> $text_label[$opt]['first'],"gridlines"=>["color"=>"none"]),
                    1=> array("title"=> $text_label[$opt]['second'],"gridlines"=>["color"=>"none"],"format"=> $text_second_axis)
                ),

                "responsive"=>true,
                "maintainAspectRatio"=> false,
                "legend"=>array(
                    "position"=>'bottom'
                ),
            ),
        ));
        print("</div></div>");

What should i change?

David Winterburn commented on Feb 15, 2021

Hi,

Please try to set the chart's "height" property in px and let us know the result. Thanks!

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