LaravelDaily/laravel-charts

how to use chart_height

Opened this issue · 1 comments

Tried setting it in option but it doesn't follow the height:

$chart_options = [
        'chart_height' => 750,
            'chart_title' => 'Users',
            'report_type' => 'group_by_date',
            'model' => 'App\Models\User',
            'group_by_field' => 'created_at',
            'group_by_period' => 'day',
            'chart_type' => 'line',
            'filter_days' => 30,
            'show_blank_data'=>true,
            'chart_color' => '79, 142, 191',
            'conditions'  => [
                        
                        ['name' => 'Users', 'condition' => 'account_type = "User" ', 'color' => '','fill' => false],
                    ],
        ];
netm commented

I'd like to know this too !

I hacked it by containing the chart in a div with set height and adding the following to the javascript file:

responsive: true,
maintainAspectRatio: false,