LaravelDaily / laravel-charts

Package to draw charts in Laravel with Chart.js
MIT License
531 stars 118 forks source link

ErrorException while using LaravelChart in Laravel-Employee-Attendance-Reports project #81

Closed kyaroslav closed 2 years ago

kyaroslav commented 2 years ago

Example usage in Controller

            $chart = new LaravelChart([
                'chart_title'           => 'Hours of work per day',
                'chart_type'            => 'line',
                'report_type'           => 'group_by_date',
                'model'                 => 'App\\TimeEntry',
                'group_by_field'        => 'time_start',
                'group_by_period'       => 'day',
                'aggregate_function'    => 'sum',
                'aggregate_field'       => 'total_time_chart',
                'column_class'          => 'col-md-8',
                'continuous_time'       => true,
            ]);

Steps to reproduce in an Example project "Laravel-Employee-Attendance-Reports"

  1. Install project and seed example data
  2. login as admin
  3. go to page /admin/reports?employee=11 Error appears Screenshot 2022-01-03 at 19 42 40
PovilasKorop commented 2 years ago

@kyaroslav thanks for your fix #82 - I've merged and released a new package version 0.1.29 - will that fix the issue in the employee attendance report?

kyaroslav commented 2 years ago

@PovilasKorop Yes, now the issue in the employee attendance report is fixed. Just need to use composer update command , composer install will install "laraveldaily/laravel-charts": "^0.1.13" according to composer.json.

PovilasKorop commented 2 years ago

@kyaroslav great to hear!