Skip to content

Commit

Permalink
- CHG: Removed rep heatmap if there are no real reps just unique desc…
Browse files Browse the repository at this point in the history
…riptors.
  • Loading branch information
sebastian-raubach committed Mar 8, 2024
1 parent c0c3d4c commit 71acb09
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/components/charts/GermplasmRepHeatmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,26 @@ export default {
this.allGermplasm = [...Object.keys(germplasmMap)].sort((a, b) => a.localeCompare(b))
this.germplasmMap = germplasmMap
this.$emit('rep-count-changed', this.reps.filter(r => r !== undefined && r !== null).length)
const hasActualReps = Object.values(germplasmMap).filter(m => {
const localSet = new Set()
m.forEach(mm => {
if (mm.rep !== undefined && mm.rep !== null && mm.rep !== '') {
localSet.add(mm.rep)
}
})
return localSet.size > 1
}).length > 0
if (hasActualReps) {
this.$emit('rep-count-changed', this.reps.filter(r => r !== undefined && r !== null).length)
} else {
this.reps = []
this.allGermplasm = []
this.germplasmMap = {}
this.$emit('rep-count-changed', 0)
}
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/changelog/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@
"type": "update",
"title": "Aussehen der Versuchsauswahl",
"text": "Die Versuchsauswahl-Karten sehen leicht anders aus. Statt einer Liste wird nun ein Raster an Elementen angezeigt."
},
{
"type": "update",
"title": "Replikat-Heatmap",
"text": "Die Replikat-Heatmap wurde entfernt in Fällen wo Replikate definiert sind aber alle Replikatwerte einzigartig sind und somit keine echten Replikate vorhanden sind. Zuvor wurde hier eine riesige leere und größtenteils nutzlose Heatmap generiert."
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/changelog/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@
"type": "update",
"title": "Trial selector visuals",
"text": "The trial selector cards have changed slightly. Instead of showing the items as a list, they're now displayed as a grid of elements."
},
{
"type": "update",
"title": "Replicate heatmap",
"text": "Removed the replicate heatmap for those trials where replicates are defined, but they are all unique, so not actual replicates. Before this generated a huge and empty and therefore rather useless heatmap."
}
]
}
Expand Down

0 comments on commit 71acb09

Please sign in to comment.