fixed missing days and sorting in traffic widget

This commit is contained in:
Čarodej
2022-02-28 09:03:57 +01:00
parent 2e80da830a
commit c2e4b50df5
5 changed files with 69 additions and 39 deletions

View File

@@ -4,16 +4,6 @@
>
<!--Data bar-->
<Bar v-for="(item, i) in data" :key="i" :bar="item" />
<!--Ghost bar-->
<span
v-if="ghostLength > 0"
class="relative block cursor-pointer bg-gray-100 dark:bg-gray-800 lg:mr-2 lg:w-2 2xl:w-3"
v-for="(ghost, i) in ghostLength"
:style="{ height: '7%' }"
:key="i"
>
</span>
</div>
</template>
<script>
@@ -25,10 +15,5 @@ export default {
components: {
Bar,
},
computed: {
ghostLength() {
return 45 - this.data.length
},
},
}
</script>