Skip to content

Commit

Permalink
web-client/validation: fix graph updates
Browse files Browse the repository at this point in the history
  • Loading branch information
s314cy committed Nov 23, 2022
1 parent 3a2a4db commit 4fdb2d8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions web-client/src/components/validation/Validator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
height="200"
type="area"
:options="chartOptions"
:series="[{ data: accuracyData }]"
:series="accuracyData"
/>
</template>
</IconCard>
Expand Down Expand Up @@ -137,9 +137,9 @@ import { storeToRefs } from 'pinia'
import { browser, data, ConsoleLogger, EmptyMemory, Memory, Task, Validator } from '@epfml/discojs'
import { chartOptions } from '@/charts'
import { useMemoryStore } from '@/store/memory'
import { useValidationStore } from '@/store/validation'
import { chartOptions } from '@/charts'
import { useToaster } from '@/composables/toaster'
import IconCard from '@/components/containers/IconCard.vue'
import CustomButton from '@/components/simple/CustomButton.vue'
Expand All @@ -162,9 +162,13 @@ const numberOfClasses = computed<number>(() =>
const memory = computed<Memory>(() =>
useIndexedDB ? new browser.IndexedDB() : new EmptyMemory())
const accuracyData = computed<number[]>(() => {
const accuracyData = computed<[{ data: number[] }]>(() => {
const r = validator.value?.accuracyData
return r !== undefined ? r.toArray() : [0]
return [{
data: r !== undefined
? r.map((e) => e * 100).toArray()
: [0]
}]
})
const currentAccuracy = computed<string>(() => {
Expand Down

0 comments on commit 4fdb2d8

Please sign in to comment.