Commit e82c6ff2 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

Fixed issue that occured when group is empty (survival plot)

parent 3936a6da
Pipeline #5387 passed with stages
in 5 minutes and 51 seconds
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
import Crosshair from '../components/Crosshair.vue' import Crosshair from '../components/Crosshair.vue'
import Html2svg from '../components/HTML2SVG.vue' import Html2svg from '../components/HTML2SVG.vue'
import Draggable from '../components/Draggable.vue' import Draggable from '../components/Draggable.vue'
import _ from 'lodash'
export default { export default {
name: 'survivalplot', name: 'survivalplot',
components: {Draggable, Html2svg, Crosshair, DataBox, Chart, ControlPanel}, components: {Draggable, Html2svg, Crosshair, DataBox, Chart, ControlPanel},
...@@ -142,6 +143,9 @@ ...@@ -142,6 +143,9 @@
let estimateGlobalMax = Number.MIN_SAFE_INTEGER let estimateGlobalMax = Number.MIN_SAFE_INTEGER
this.results.categories.forEach(category => { this.results.categories.forEach(category => {
this.results.subsets.forEach(subset => { this.results.subsets.forEach(subset => {
if (!_.has(this.results.stats, [category, subset])) {
return true
}
const [localTimelineMin, localTimelineMax] = d3.extent(this.results.stats[category][subset].timeline) const [localTimelineMin, localTimelineMax] = d3.extent(this.results.stats[category][subset].timeline)
timelineGlobalMin = localTimelineMin < timelineGlobalMin ? localTimelineMin : timelineGlobalMin timelineGlobalMin = localTimelineMin < timelineGlobalMin ? localTimelineMin : timelineGlobalMin
timelineGlobalMax = localTimelineMax > timelineGlobalMax ? localTimelineMax : timelineGlobalMax timelineGlobalMax = localTimelineMax > timelineGlobalMax ? localTimelineMax : timelineGlobalMax
...@@ -176,6 +180,9 @@ ...@@ -176,6 +180,9 @@
const groups = [] const groups = []
this.results.categories.forEach(category => { this.results.categories.forEach(category => {
this.results.subsets.forEach(subset => { this.results.subsets.forEach(subset => {
if (!_.has(this.results.stats, [category, subset])) {
return true
}
groups.push({name: this.getGroupName(category, subset)}) groups.push({name: this.getGroupName(category, subset)})
}) })
}) })
...@@ -188,6 +195,9 @@ ...@@ -188,6 +195,9 @@
const paths = [] const paths = []
this.results.categories.forEach(category => { this.results.categories.forEach(category => {
this.results.subsets.forEach(subset => { this.results.subsets.forEach(subset => {
if (!_.has(this.results.stats, [category, subset])) {
return true
}
let path = '' let path = ''
this.results.stats[category][subset].estimate.forEach((d, i, arr) => { this.results.stats[category][subset].estimate.forEach((d, i, arr) => {
const stats = this.results.stats[category][subset] const stats = this.results.stats[category][subset]
...@@ -211,6 +221,9 @@ ...@@ -211,6 +221,9 @@
const paths = [] const paths = []
this.results.categories.forEach(category => { this.results.categories.forEach(category => {
this.results.subsets.forEach(subset => { this.results.subsets.forEach(subset => {
if (!_.has(this.results.stats, [category, subset])) {
return true
}
const stats = this.results.stats[category][subset] const stats = this.results.stats[category][subset]
let path = '' let path = ''
let backpath = ' Z ' let backpath = ' Z '
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment