PATH:
home
/
rwabteecom
/
project_11
/
resources
/
views
/
dashboard
/
partials
/
Editing: link-status.blade.php
<script> @php $today = now()->toDateString(); $startOfMonth = now()->startOfMonth()->toDateString(); $fromDate = request('from', $startOfMonth); $toDate = request('to', $today); @endphp const fromDate = "{{ $fromDate }}"; const toDate = "{{ $toDate }}"; $(".datepicker").flatpickr({ mode: "range", defaultDate: [fromDate, toDate] }); $("input[name='analytics-range']").on("change" , function(){ let dater = $(this).val().split(" to "); if(dater.length > 1){ $("input[name='from']").val(dater[0]); $("input[name='to']").val(dater[1]); $("#date-form").submit(); } }) // ---------------------- const LimkData = { labels: @json($days), datasets: [{ label: '{{__("Clicks")}}', data: @json($analytics_day), // Sample data representing user activity fill: true, // Fill the area under the line backgroundColor: 'rgba(241, 250, 255, .6)', // Area color borderColor: 'rgba(0, 163, 255, 1)', // Line color borderWidth: 3 }] }; // Configuration for the chart const linkStatusConfig = { type: 'line', data: LimkData, options: { plugins: { title: { display: false, text: 'User Activity Over the Week' }, legend: { display: true, position: 'bottom', labels: { boxWidth: 13, boxHeight: 13, padding: 30, pointStyle: 'circle', borderWidth:0, usePointStyle: true, color: 'rgba(113, 142, 191, 1)', font: { size: 16, } }, } }, scales: { x: { title: { display: false, text: 'Day of the Week' }, ticks: { font: { color: 'rgba(113, 142, 191,1)' // Adjust font color } }, }, y: { title: { display: false, text: 'Activity' }, ticks: { font: { color: 'rgba(113, 142, 191,1)' // Adjust font color } }, } } }, }; const linksChart = new Chart( document.getElementById('linkSatusChart'), linkStatusConfig ); </script>
SAVE
CANCEL