laravel-charts icon indicating copy to clipboard operation
laravel-charts copied to clipboard

Sorting issue

Open malogajski opened this issue 2 years ago • 1 comments
trafficstars

Result isn’t sorted properly (year, month ASC) and I'm not sure why?

configuration:

'chart_title'           => 'Monthly income',
'chart_type'            => 'bar',
'report_type'           => 'group_by_date',
'model'                 => 'App\Models\Invoice',
'group_by_field'        => 'invoice_date',
'group_by_period'       => 'month',
'aggregate_function'    => 'sum',
'aggregate_field'       => 'total',
'filter_field'          => 'invoice_date',
'filter_period'         => 'year',
'group_by_field_format' => 'd.m.Y',
'column_class'          => 'w-full',
'entries_number'        => '5',
'translation_key'       => 'invoice',

Result - check months

image

malogajski avatar Dec 15 '22 08:12 malogajski

@malogajski hard to say without debugging with your real data or reproducing. Is your project open-source by any chance and I could reproduce the situation?

The parameters seem all correct, I don't see any obvious issues.

PovilasKorop avatar Dec 15 '22 09:12 PovilasKorop