nova-chartjs icon indicating copy to clipboard operation
nova-chartjs copied to clipboard

How to add button filter on line chart?

Open PoojaJadav opened this issue 3 years ago • 0 comments

I want to add a button filter on a line chart. but I don't know why it's not showing there.

(new LineChart())
                ->title('Revenue')
                ->animations([
                    'enabled' => true,
                    'easing'  => 'easeinout',
                ])
                ->series([[
                              'label'       => 'Average Sales',
                              'borderColor' => '#f7a35c',
                              'fill'        => true,
                              'data'        => [80, 90, 80, 40, 62, 79, 79, 90, 90, 90, 92, 91],
                          ], [
                              'fill'        => true,
                              'label'       => 'Average Sales #2',
                              'borderColor' => '#90ed7d',
                              'data'        => [90, 80, 40, 22, 79, 129, 30, 40, 90, 92, 91, 80],
                          ]])
                ->options([
                    'xaxis'            => [
                        'categories' => ['Jan', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']
                    ],
                    'btnFilter'        => true,
                ])
                ->width('2/3'),
image

can you plz support me here? how can I add filter button?

PoojaJadav avatar Mar 31 '22 06:03 PoojaJadav