Skip to content

Commit

Permalink
Reverse order of cnv loss colors
Browse files Browse the repository at this point in the history
  • Loading branch information
creilly8 committed Nov 5, 2024
1 parent 43d0c50 commit 7bf03cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/plots/matrix/matrix.legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ export function getLegendData(legendGroups, refs, self) {
const count = item.samples?.size
if (item.scale) {
const colors = item.domain?.map(c => item.scale(c)) || item.scale.range()
if (item.key.includes('CNV_loss')) {
/** Hardcoded for cnv loss to avoid rendering errors within
* the matrix.
* TODO: Appropriate to change to item.minLabel == 0 && item.maxLabel <0
* to avoid hardcoding? */
colors.reverse()
}
const domain = setColorScaleDomain(item.minLabel, item.maxLabel, item.domain, colors)
return {
termid: $id,
Expand Down

0 comments on commit 7bf03cd

Please sign in to comment.