我正在使用laravel图表(laraveldaily)
控制器
$options = [
'chart_title' => 'Animals by type','chart_type' => 'pie','report_type' => 'group_by_relationship','model' => 'App\Animal','relationship_name' => 'type',// represents function type() on Transaction model
'group_by_field' => 'category',// types.category
'filter_months' => 12,// show only transactions for last 30 days
];
$chart2 = new LaravelChart($options);
return view('admin.index',compact('users','chart2'));
我认为我有
<div class="row pl-lg-5" style="width: 40%;">
<h1>{{ $chart2->options['chart_title'] }}</h1>
{!! $chart2->renderHtml() !!}
<hr>
</div>
@section('scripts')
{!! $chart2->renderJs() !!}
{!! $chart2->renderChartJslibrary() !!}
@endsection
我只得到标题,没有图表