Skip to content

Commit

Permalink
Add table for categorical params to ClinicalData.tsx
Browse files Browse the repository at this point in the history
- Change logic related to showing checkboxes leaving only show N/A for table
- Rename "Plot Type" to "Visualisation Type"
  • Loading branch information
pozhidaevak committed Oct 5, 2024
1 parent 2f5f075 commit 2566fea
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/pages/groupComparison/ClinicalData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const categoryPlotTypeOptions = [
label: '100% stacked bar chart',
},
{ value: CategoryPlotType.Heatmap, label: 'Heatmap' },
{ value: CategoryPlotType.Table, label: 'Table' },
];

function isNumerical(datatype?: string) {
Expand Down Expand Up @@ -277,7 +278,14 @@ export default class ClinicalData extends React.Component<
}

@computed get showHorizontalBarControls() {
return !this.showLogScaleControls && !this.isHeatmap;
return (
!this.showLogScaleControls &&
!this.isHeatmap &&
!(
!this.isNumericalPlot &&
this.categoryPlotType === CategoryPlotType.Table
)
);
}

@computed get showSwapAxisControls() {
Expand All @@ -286,9 +294,11 @@ export default class ClinicalData extends React.Component<

@computed get isTable() {
return (
this.isNumericalPlot &&
this.numericalVisualisationType ===
ClinicalNumericalVisualisationType.Table
(this.isNumericalPlot &&
this.numericalVisualisationType ===
ClinicalNumericalVisualisationType.Table) ||
(!this.isNumericalPlot &&
this.categoryPlotType === CategoryPlotType.Table)
);
}

Expand Down Expand Up @@ -728,7 +738,7 @@ export default class ClinicalData extends React.Component<
className="form-group"
style={{ display: 'flex', alignItems: 'center' }}
>
<label>Plot Type</label>
<label>Visualisation Type</label>
<div
style={{ width: 240, marginLeft: 5 }}
data-test="plotTypeSelector"
Expand Down

0 comments on commit 2566fea

Please sign in to comment.