Skip to content

Commit

Permalink
Fix conditions graph
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Jan 28, 2024
1 parent ce84086 commit 483a47f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/components/stats/ConditionsComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Pie } from "vue-chartjs";
const props = defineProps<{
conditions: { dbValue: string; color: string; text: string }[];
numberPerCondition: Record<string, number>;
style: Record<string, string>;
style?: Record<string, string>;
}>();
Chart.register(Legend, PieController, Tooltip, Title, ArcElement);
Expand Down
7 changes: 5 additions & 2 deletions apps/web/src/pages/stats/conditions.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<template>
<LinkToCollectionIfNoIssue />
<ConditionsComponent :conditions="conditionsWithoutMissing" />
<ConditionsComponent
:conditions="conditionsWithoutMissing"
:number-per-condition="numberPerCondition"
/>
</template>

<script setup lang="ts">
import condition from "~/composables/useCondition";
const { loadCollection } = collection();
const { loadCollection, numberPerCondition } = collection();
const conditionsWithoutMissing = condition()
.conditions.filter(({ dbValue }) => dbValue !== "missing")
Expand Down

0 comments on commit 483a47f

Please sign in to comment.