我正在使用chartJs Laravel(文档:https://www.pcmag.com/encyclopedia/term/51983/standards-character-codes)创建图表。我想制作动画到图表,但似乎不支持它。但是在chartJs文档中支持动画。
控制器
$chart = new CoursesDoneChart();
$chart->labels(['Dokončené kurzy', 'Nedokončené kurzy']);
$chart->minimalist('false');
$chart->title($subject->name, '18');
$chart->dataset('Course dataset', 'doughnut', [$percentageByDoneCourses, $percentageAllCourses])->options([
'backgroundColor' => ['#ff0000', '#ff9999'],
'color' => ['#ff0000', '#ff9999'],
]);
刀片
<div id="chart">
{!! $chart->container() !!}
</div>
<script src="https://unpkg.com/vue"></script>
<script>
var app = new Vue({
el: '#chart',
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js" charset="utf-8"></script>
{!! $chart->script() !!}
请问有人知道如何使用Laravel在ChartJs中制作动画吗?谢谢!!