LaravelDaily / laravel-charts

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

A two digit month could not be found Data missing #75

Closed tarikmanoar closed 2 years ago

tarikmanoar commented 2 years ago

image

In My Controller

        $registerChart = new LaravelChart([
            'chart_title'           => 'Users',
            'chart_type'            => 'line',
            'report_type'           => 'group_by_date',
            'model'                 => 'App\Models\User',
            'group_by_field'        => 'created_at',
            'group_by_period'       => 'day',
            'aggregate_function'    => 'count',
            'filter_field'          => 'created_at',
            'filter_days'           => '30',
            'group_by_field_format' => 'Y-m-d H:i:s',
            'column_class'          => 'col-md-12',
            'entries_number'        => '5',
            'translation_key'       => 'user',
            'continuous_time'       => true,
        ]);

In My Blade

{!! $registerChart->renderHtml() !!}
@section('script')
{!! $registerChart->renderChartJsLibrary() !!}
{!! $registerChart->renderJs() !!}
@endsection
tarikmanoar commented 2 years ago

Solved