Skip to content

Commit

Permalink
chore(playground.component.ts): change legend font-size based on dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
Helias committed Jun 17, 2024
1 parent 059630f commit 311d24d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/app/components/datasets/datasets.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ export interface QueryParameters {
}

export const IGNORE_FEATURES = ['label', 'AUDIO_FILE_NAME', 'Unused', 'SPEAKER_ID', 'SYSTEM_ID', 'dataset'];
export const DATASETS_WITH_ALGORITHMS_LABEL = ['ASVSPOOF_2019_LA_V2', 'TIMIT_TTS_CLEAN', 'IEEE_SPCUP_2022'];
export const DATASETS_WITH_VARIATIONS = ['ASVSPOOF_2019_LA_V2', 'FAKE_OR_REAL', 'IN_THE_WILD'];
export const DATASETS_WITH_ALGORITHMS_LABEL: Dataset[] = ['ASVSPOOF_2019_LA_V2', 'TIMIT_TTS_CLEAN', 'IEEE_SPCUP_2022'];
export const DATASETS_WITH_VARIATIONS: Dataset[] = ['ASVSPOOF_2019_LA_V2', 'FAKE_OR_REAL', 'IN_THE_WILD'];
export const DATASET_SMALLER_LABEL: Dataset[] = ['ASVSPOOF_2019_LA_V2'];

export const DATASETS = [
'ASVSPOOF_2019_LA',
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/playground/playground.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BehaviorSubject, Subject, combineLatest, from, tap } from 'rxjs';
import { filter, switchMap, takeUntil } from 'rxjs/operators';
import { COLORS } from '../../app.model';
import { PlaygroundService } from '../../services/playground/playground.service';
import { DATASETS, Dataset, DatasetAlgorithmLabel, SYNTHETIC_LABELS } from '../datasets/datasets.model';
import { DATASETS, DATASET_SMALLER_LABEL, Dataset, DatasetAlgorithmLabel, SYNTHETIC_LABELS } from '../datasets/datasets.model';

@Component({
selector: 'app-playground',
Expand Down Expand Up @@ -58,7 +58,7 @@ export class PlaygroundComponent implements OnDestroy {
private readonly refreshLabel$ = new BehaviorSubject<boolean>(false);
private labels: string[];

private getLayout: (dataset: string, feature: string) => Partial<Layout> = (dataset, feature) => ({
private getLayout: (dataset: Dataset, feature: string) => Partial<Layout> = (dataset, feature) => ({
width: 1000,
height: 650,
dragmode: 'pan',
Expand All @@ -67,7 +67,7 @@ export class PlaygroundComponent implements OnDestroy {
legend: {
xanchor: 'right',
font: {
size: 18,
size: DATASET_SMALLER_LABEL.includes(dataset) && this._algorithm ? 14 : 18,
},
},
xaxis: {
Expand Down

0 comments on commit 311d24d

Please sign in to comment.