LaravelDaily/laravel-charts

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

kyaroslav opened this issue · 3 comments

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

@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?

@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.

@kyaroslav great to hear!