KoolReport's Forum

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

Label doesn't show in ColumnCharts #1656

Open Thomas opened this topic on on Oct 9, 2020 - 2 comments

Thomas commented on Oct 9, 2020

What can I do to label the Columns. In all ColumnCharts (Chartjs, D3, Google) the columns are labeled by the original columnname.

        ColumnChart::create(array(
            "title"=>"Vergleich",
            "dataSource"=>$groups_data_main_survey_object->whereIn('title', array('AT01','AT02')),
            "columns"=>array(
                "question",
                "group_0_a_avg"=>array(
                    "label" => "IST",
                    "type"=>"number"
                ),
                "group_0_b_avg"=>array(
                    "label" => "SOLL",
                    "type"=>"number"
                ),
                "group_0_difference_avg"=>array(
                    "label" => "Differenz",
                    "type"=>"number"
                ),
            ),
            
        ));
KoolReport commented on Oct 9, 2020

We could not replicate the issue. May you show us image?

Thomas commented on Oct 9, 2020

The issue is the KoolReport object. By transforming it an array the label and other column options are working.

"dataSource"=>$groups_data_main_survey_object->whereIn('title', array('AT01','AT02'))->toArray(),

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

ChartJS