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

Remove NA label when NA=0 in filter chart #5126

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

lllinging
Copy link
Contributor

Fix cBioPortal/cbioportal#11056

I can reproduce this issue. Checking the code, it was due to thecomputed method labelShowingNA is not checking whether NA=0. A simple fix would be adding an if clause so that when labelNA==='0' then return null. I don't think backend changes are needed here.

Describe changes proposed in this pull request:

  • If the count of the data bin with NA is zero, return null for the computed method that renders the NA label on the chart.

Checks

  • Has tests or has a separate issue that describes the types of test that should be created. If no test is included it should explicitly be mentioned in the PR why there is no test.
  • The commit log is comprehensible. It follows 7 rules of great commit messages. For most PRs a single commit should suffice, in some cases multiple topical commits can be useful. During review it is ok to see tiny commits (e.g. Fix reviewer comments), but right before the code gets merged to master or rc branch, any such commits should be squashed since they are useless to the other developers. Definitely avoid merge commits, use rebase instead.
  • Is this PR adding logic based on one or more clinical attributes? If yes, please make sure validation for this attribute is also present in the data validation / data loading layers (in backend repo) and documented in File-Formats Clinical data section!

Any screenshots or GIFs?

fix-na-label

Copy link

netlify bot commented Mar 11, 2025

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit c770d88
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/67d0787ef9512f00089561e6
😎 Deploy Preview https://deploy-preview-5126.preview.cbioportal.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@alisman alisman force-pushed the fix-display-zero-na-label branch from b75b688 to c770d88 Compare March 11, 2025 17:53
@alisman alisman merged commit bad9851 into cBioPortal:master Mar 11, 2025
13 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"NA: 0" should not be displayed when NA=0 in filter chart
2 participants