Laravel 5.6, For installing laravel charts
package as per documents guideline from : Laravel Charts
I am facing white screen when trying to use docs. example as per below code:
Controller:
public function index()
{
//
$chart = new SampleChart;
$chart->labels(['One', 'Two', 'Three', 'Four']);
$chart->dataset('My dataset', 'line', [1, 2, 3, 4]);
$chart->dataset('My dataset 2', 'line', [4, 3, 2, 1]);
return view('sample_view', compact('chart'));
}
This is my blade code:
<head>
<meta charset="utf-8">
<title>Chart with VueJS</title>
</head>
<body>
{!! $chart->container() !!}
<script src=https://cdnjs.cloudflare.com/ajax/libs/echarts/4.0.2/echarts-en.min.js charset=utf-8></script>
{!! $chart->script() !!}
</body>
Console error and code:
Uncaught ReferenceError: Chart is not defined at afrmduesqtlghwypvzkijnxoc_create (test:60) at afrmduesqtlghwypvzkijnxoc_load (test:72)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire