Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Metrics filter nog showing without model #184

Open
matthbon opened this issue Oct 31, 2024 · 0 comments
Open

[BUG] Metrics filter nog showing without model #184

matthbon opened this issue Oct 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@matthbon
Copy link

matthbon commented Oct 31, 2024

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
@matthbon matthbon added the bug Something isn't working label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant