Skip to content

Commit

Permalink
improve view file
Browse files Browse the repository at this point in the history
Signed-off-by: Abbas mkhzomi <[email protected]>
  • Loading branch information
abbasudo committed Dec 16, 2023
1 parent 32b4693 commit cc1ea2e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions resources/views/livewire/usage-hours.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<div
wire:ignore
x-data="queueChart({
x-data="usageChart({
labels: @js($usage->keys()),
data: @js($usage->values()),
})"
Expand Down Expand Up @@ -60,7 +60,7 @@ class="ring-1 ring-gray-900/5 dark:ring-gray-100/10 bg-gray-50 dark:bg-gray-800

@script
<script>
Alpine.data('queueChart', (config) => ({
Alpine.data('usageChart', (config) => ({
init() {
let chart = new Chart(
this.$refs.canvas,
Expand All @@ -74,12 +74,8 @@ class="ring-1 ring-gray-900/5 dark:ring-gray-100/10 bg-gray-50 dark:bg-gray-800
borderColor: '#9333ea',
backgroundColor: 'rgba(147,51,234,0.10)',
borderWidth: 2,
borderCapStyle: 'round',
borderRadius: 3,
data: config.data,
pointHitRadius: 10,
pointStyle: false,
tension: 0.2,
spanGaps: false,
},
],
},
Expand Down

0 comments on commit cc1ea2e

Please sign in to comment.