Skip to content

[BUG] Metrics filter nog showing without model #184

@matthbon

Description

@matthbon

Describe the bug
I insert custom data because I need to join from different tables. All is showing good. But the metrics filter is not showing.

To Reproduce
Steps to reproduce the behavior:

            ->title(__('Revenue Costs Profit Per Day'))
            ->animations([
                'enabled' => true,
                'easing' => 'easeinout',
            ])
            ->series([
                [
                    'barPercentage' => 0.5,
                    'label' => __('Revenue'),
                    'borderColor' => '#f7a35c',
                    'data' => [15, 30, 50, 70, 90, 110, 130, 150, 170, 190],
                ],[
                    'barPercentage' => 0.5,
                    'label' => __('Costs'),
                    'borderColor' => '#d8b088',
                    'data' => [5, 10, 20, 30, 40, 50, 60, 70, 80, 90],
                ],[
                    'barPercentage' => 0.5,
                    'label' => __('Profit'),
                    'borderColor' => '#90ed7d',
                    'data' => [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
                ],
            ])
            ->options([
                'latestData' => 1,
                'btnFilter' => true,
                'btnFilterDefault' => 'YTD',
                'btnFilterList' => [
                    'YTD'   => 'Year to Date',
                    'QTD'   => 'Quarter to Date',
                    'MTD'   => 'Month to Date',
                    '30'   => '30 Days', // numeric key will be set to days
                    '28'   => '28 Days', // numeric key will be set to days
                ],
                'xaxis' => [
                    'categories' => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
                ],
            ])
            ->width('full');

Expected behavior
Even without adding a model I expect the btn filter list to show so i can filter and implement the filter myself.

Dependencies Version (please complete the following information):

  • Laravel Version: 11.29.0
  • Nova Version: 4.35.4
  • Nova-ChartJS Version: 0.4.3

Desktop (please complete the following information):

  • OS: Mac osx sequoia 15.0.1
  • Browser chrome
  • Version 130.0.6723.70

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions