Skip to content

Commit

Permalink
Merge pull request #1622 from UUDigitalHumanitieslab/feature/bugfix-1560
Browse files Browse the repository at this point in the history
Hide irrelevant columns
  • Loading branch information
JeltevanBoheemen authored Jul 5, 2024
2 parents c5eca61 + db0d218 commit 6093a65
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions frontend/src/app/visualization/barchart/histogram.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,28 +213,33 @@ export class HistogramComponent
formatDownload: this.formatDownloadValue,
isOptional: 'relative_doc_count' !== valueKey,
},
{
key: 'match_count',
label: 'Token Frequency',
format: this.formatValue('raw'),
formatDownload: this.formatDownloadValue,
isOptional: 'match_count' !== valueKey,
},
{
key: 'matches_by_doc_count',
label: 'Relative Frequency (documents)',
format: this.formatValue('documents'),
formatDownload: this.formatDownloadValue,
isOptional: 'matches_by_doc_count' !== valueKey,
},
{
key: 'matches_by_token_count',
label: 'Relative Frequency (terms)',
format: this.formatValue('terms'),
formatDownload: this.formatDownloadValue,
isOptional: 'matches_by_token_count' !== valueKey,
},
];
if (this.frequencyMeasure == 'tokens') {
// Headers related to tokens should not be applied to document visualizations
this.tableHeaders = this.tableHeaders.concat([
{
key: 'match_count',
label: 'Token Frequency',
format: this.formatValue('raw'),
formatDownload: this.formatDownloadValue,
isOptional: 'match_count' !== valueKey,
},
{
key: 'matches_by_doc_count',
label: 'Relative Frequency (documents)',
format: this.formatValue('documents'),
formatDownload: this.formatDownloadValue,
isOptional: 'matches_by_doc_count' !== valueKey,
},
{
key: 'matches_by_token_count',
label: 'Relative Frequency (terms)',
format: this.formatValue('terms'),
formatDownload: this.formatDownloadValue,
isOptional: 'matches_by_token_count' !== valueKey,
},
]);
}
}
}
}

0 comments on commit 6093a65

Please sign in to comment.