Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Study View set showNA to false by default for histogram #4876

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/pages/studyView/StudyViewPageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,11 @@ export class StudyViewPageStore
public isShowNAChecked = (uniqueKey: string): boolean => {
if (this._customDataBinFilterSet.has(uniqueKey)) {
const filter = this._customDataBinFilterSet.get(uniqueKey);
return filter === undefined ? true : (filter!.showNA as boolean);
return filter === undefined ? false : (filter!.showNA as boolean);
} else {
const filter = this.getDataBinFilterSet(uniqueKey).get(uniqueKey)!;
return filter?.showNA === undefined
? true
? false
: (filter!.showNA as boolean);
}
};
Expand Down Expand Up @@ -5591,7 +5591,7 @@ export class StudyViewPageStore
return {
attributeId: attribute.clinicalAttributeId,
disableLogScale: false,
showNA: true,
showNA: false,
} as ClinicalDataBinFilter & { showNA?: boolean };
}

Expand Down
4 changes: 2 additions & 2 deletions src/pages/studyView/charts/barChart/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default class BarChart extends React.Component<IBarChartProps, {}>

@computed
get tickValuesBasedOnNA(): number[] {
if (this.props.showNAChecked) {
if (this.props.showNAChecked || !this.numberOfNA) {
return this.tickValues;
}
const tickValuesWithoutNA = this.tickValues.slice(0, -this.numberOfNA);
Expand Down Expand Up @@ -274,7 +274,7 @@ export default class BarChart extends React.Component<IBarChartProps, {}>

@computed
get labelShowingNA(): JSX.Element | null {
if (!this.props.showNAChecked) {
if (!this.props.showNAChecked && this.numberOfNA) {
const labelNA = this.barDataWithNA
.map((element: BarDatum) => element.dataBin.count)
.join(', ');
Expand Down
Loading