diff --git a/report-viewer/src/components/optionsSelectors/MetricSelector.vue b/report-viewer/src/components/optionsSelectors/MetricSelector.vue index 345d4ed68..22f3a4bbb 100644 --- a/report-viewer/src/components/optionsSelectors/MetricSelector.vue +++ b/report-viewer/src/components/optionsSelectors/MetricSelector.vue @@ -2,6 +2,7 @@ @@ -22,7 +23,7 @@ const props = defineProps({ required: false, default: '' }, - defaultSelection: { + defaultSelected: { type: String as PropType, required: false, default: MetricType.AVERAGE diff --git a/report-viewer/src/stores/state.ts b/report-viewer/src/stores/state.ts index 2f9f9603e..9eb9d80db 100644 --- a/report-viewer/src/stores/state.ts +++ b/report-viewer/src/stores/state.ts @@ -1,3 +1,5 @@ +import type { MetricType } from '@/model/MetricType' + /** * Local store. Stores the state of the application. */ @@ -67,4 +69,14 @@ export interface LoadConfiguration { export interface UIState { useDarkMode: boolean + comparisonTableSortingMetric: MetricType + distributionChartConfig: DistributionChartConfig +} + +/** + * Configuration for the distribution chart. + */ +export interface DistributionChartConfig { + metric: MetricType + xScale: 'linear' | 'logarithmic' } diff --git a/report-viewer/src/stores/store.ts b/report-viewer/src/stores/store.ts index a6ec6754c..08f2ad702 100644 --- a/report-viewer/src/stores/store.ts +++ b/report-viewer/src/stores/store.ts @@ -1,5 +1,6 @@ import { defineStore } from 'pinia' import type { State, SubmissionFile, File, LoadConfiguration, UIState } from './state' +import { MetricType } from '@/model/MetricType' /** * The store is a global state management system. It is used to store the state of the application. @@ -20,7 +21,12 @@ const store = defineStore('store', { fileIdToDisplayName: new Map() }, uiState: { - useDarkMode: false + useDarkMode: false, + comparisonTableSortingMetric: MetricType.AVERAGE, + distributionChartConfig: { + metric: MetricType.AVERAGE, + xScale: 'linear' + } } }), getters: { diff --git a/report-viewer/src/views/OverviewView.vue b/report-viewer/src/views/OverviewView.vue index 36161c346..4f030beb8 100644 --- a/report-viewer/src/views/OverviewView.vue +++ b/report-viewer/src/views/OverviewView.vue @@ -34,8 +34,8 @@

Distribution of Comparisons:

@@ -44,16 +44,20 @@ @@ -89,7 +93,10 @@