Loading src/components/StickChart.vue +8 −1 Original line number Diff line number Diff line Loading @@ -572,8 +572,15 @@ export default { result.opacity = 1 return result } // No snow detected if (image.weatherConditions === 0) { result.type = 'point' result.color = '#ff0000' result.opacity = 1 return result } // Stick not found if (!stick.visible || image.weatherConditions === 0) { if (!stick.visible) { result.type = 'point' result.color = '#d1b8b6' result.opacity = 1 Loading src/components/StickView.vue +52 −20 Original line number Diff line number Diff line Loading @@ -30,37 +30,49 @@ </text> <rect x="0" y="91" width="30" height="30" class="bar-normal" /> <text x="40" y="120" class="chart-text">Normal: {{ statsNormal }}</text> <rect x="0" y="131" width="30" height="30" class="bar-not-marked" /> <rect x="0" y="131" width="30" height="30" class="bar-not-found" /> <text x="40" y="160" class="chart-text"> Not marked: {{ statsNotMarked }} Not found: {{ statsNotFound }} </text> <rect x="0" y="171" width="30" height="30" class="bar-no-snow" /> <text x="40" y="200" class="chart-text"> No snow: {{ statsNoSnow }} </text> <rect :x="barChart.barManuallyEdited.x" y="180" y="220" :width="barChart.barManuallyEdited.width" height="60" class="bar-manually-edited" /> <rect :x="barChart.barDiscarded.x" y="180" y="220" :width="barChart.barDiscarded.width" height="60" class="bar-discarded" /> <rect :x="barChart.barNormal.x" y="180" y="220" :width="barChart.barNormal.width" height="60" class="bar-normal" /> <rect :x="barChart.barNotmarked.x" y="180" :width="barChart.barNotmarked.width" :x="barChart.barNotFound.x" y="220" :width="barChart.barNotFound.width" height="60" class="bar-not-found" /> <rect :x="barChart.barNoSnow.x" y="220" :width="barChart.barNoSnow.width" height="60" class="bar-not-marked" class="bar-no-snow" /> </svg> </div> Loading Loading @@ -146,22 +158,27 @@ export default { statsDiscarded() { return this.$store.getters.statsDiscarded(this.cameraID, this.stickID) }, statsNotMarked() { return this.$store.getters.statsNotMarked(this.cameraID, this.stickID) statsNotFound() { return this.$store.getters.statsNotFound(this.cameraID, this.stickID) }, statsNoSnow() { return this.$store.getters.statsNoSnow(this.cameraID, this.stickID) }, statsNormal() { return ( this.$store.getters.statsAllPoints(this.cameraID) - this.statsManuallyEdited - this.statsDiscarded - this.statsNotMarked this.statsNotFound - this.statsNoSnow ) }, statsAll() { return ( this.statsManuallyEdited + this.statsDiscarded + this.statsNotMarked + this.statsNotFound + this.statsNoSnow + this.statsNormal ) }, Loading @@ -180,16 +197,27 @@ export default { width: scale(this.statsManuallyEdited) }, barDiscarded: { x: scale(this.statsManuallyEdited), x: scale(this.statsManuallyEdited) + 0, width: scale(this.statsDiscarded) }, barNormal: { x: scale(this.statsDiscarded), x: scale(this.statsDiscarded) + scale(this.statsManuallyEdited), width: scale(this.statsNormal) }, barNotmarked: { x: scale(this.statsNormal), width: scale(this.statsNotMarked) barNotFound: { x: scale(this.statsNormal) + scale(this.statsDiscarded) + scale(this.statsManuallyEdited), width: scale(this.statsNotFound) }, barNoSnow: { x: scale(this.statsNotFound) + scale(this.statsNormal) + scale(this.statsDiscarded) + scale(this.statsManuallyEdited), width: scale(this.statsNoSnow) } } Loading Loading @@ -255,8 +283,12 @@ export default { fill: var(--color-normal); } .bar-not-marked { fill: var(--color-not-marked); .bar-not-found { fill: var(--color-not-found); } .bar-no-snow { fill: var(--color-no-snow); } .chart-text { Loading src/store/getters.js +15 −2 Original line number Diff line number Diff line Loading @@ -330,7 +330,7 @@ export default { } return result }, statsNotMarked: state => (cameraID, stickID) => { statsNotFound: state => (cameraID, stickID) => { let result = 0 if (!state.chronology[cameraID]) { return result Loading @@ -338,7 +338,20 @@ export default { for (const imageName of state.chronology[cameraID].order) { const stick = state.data[cameraID][imageName].sticks[stickID] const image = state.data[cameraID][imageName] if (!stick.visible || image.weatherConditions === 0) { if (!stick.visible && image.weatherConditions !== 0) { result += 1 } } return result }, statsNoSnow: state => cameraID => { let result = 0 if (!state.chronology[cameraID]) { return result } for (const imageName of state.chronology[cameraID].order) { const image = state.data[cameraID][imageName] if (image.weatherConditions === 0) { result += 1 } } Loading Loading
src/components/StickChart.vue +8 −1 Original line number Diff line number Diff line Loading @@ -572,8 +572,15 @@ export default { result.opacity = 1 return result } // No snow detected if (image.weatherConditions === 0) { result.type = 'point' result.color = '#ff0000' result.opacity = 1 return result } // Stick not found if (!stick.visible || image.weatherConditions === 0) { if (!stick.visible) { result.type = 'point' result.color = '#d1b8b6' result.opacity = 1 Loading
src/components/StickView.vue +52 −20 Original line number Diff line number Diff line Loading @@ -30,37 +30,49 @@ </text> <rect x="0" y="91" width="30" height="30" class="bar-normal" /> <text x="40" y="120" class="chart-text">Normal: {{ statsNormal }}</text> <rect x="0" y="131" width="30" height="30" class="bar-not-marked" /> <rect x="0" y="131" width="30" height="30" class="bar-not-found" /> <text x="40" y="160" class="chart-text"> Not marked: {{ statsNotMarked }} Not found: {{ statsNotFound }} </text> <rect x="0" y="171" width="30" height="30" class="bar-no-snow" /> <text x="40" y="200" class="chart-text"> No snow: {{ statsNoSnow }} </text> <rect :x="barChart.barManuallyEdited.x" y="180" y="220" :width="barChart.barManuallyEdited.width" height="60" class="bar-manually-edited" /> <rect :x="barChart.barDiscarded.x" y="180" y="220" :width="barChart.barDiscarded.width" height="60" class="bar-discarded" /> <rect :x="barChart.barNormal.x" y="180" y="220" :width="barChart.barNormal.width" height="60" class="bar-normal" /> <rect :x="barChart.barNotmarked.x" y="180" :width="barChart.barNotmarked.width" :x="barChart.barNotFound.x" y="220" :width="barChart.barNotFound.width" height="60" class="bar-not-found" /> <rect :x="barChart.barNoSnow.x" y="220" :width="barChart.barNoSnow.width" height="60" class="bar-not-marked" class="bar-no-snow" /> </svg> </div> Loading Loading @@ -146,22 +158,27 @@ export default { statsDiscarded() { return this.$store.getters.statsDiscarded(this.cameraID, this.stickID) }, statsNotMarked() { return this.$store.getters.statsNotMarked(this.cameraID, this.stickID) statsNotFound() { return this.$store.getters.statsNotFound(this.cameraID, this.stickID) }, statsNoSnow() { return this.$store.getters.statsNoSnow(this.cameraID, this.stickID) }, statsNormal() { return ( this.$store.getters.statsAllPoints(this.cameraID) - this.statsManuallyEdited - this.statsDiscarded - this.statsNotMarked this.statsNotFound - this.statsNoSnow ) }, statsAll() { return ( this.statsManuallyEdited + this.statsDiscarded + this.statsNotMarked + this.statsNotFound + this.statsNoSnow + this.statsNormal ) }, Loading @@ -180,16 +197,27 @@ export default { width: scale(this.statsManuallyEdited) }, barDiscarded: { x: scale(this.statsManuallyEdited), x: scale(this.statsManuallyEdited) + 0, width: scale(this.statsDiscarded) }, barNormal: { x: scale(this.statsDiscarded), x: scale(this.statsDiscarded) + scale(this.statsManuallyEdited), width: scale(this.statsNormal) }, barNotmarked: { x: scale(this.statsNormal), width: scale(this.statsNotMarked) barNotFound: { x: scale(this.statsNormal) + scale(this.statsDiscarded) + scale(this.statsManuallyEdited), width: scale(this.statsNotFound) }, barNoSnow: { x: scale(this.statsNotFound) + scale(this.statsNormal) + scale(this.statsDiscarded) + scale(this.statsManuallyEdited), width: scale(this.statsNoSnow) } } Loading Loading @@ -255,8 +283,12 @@ export default { fill: var(--color-normal); } .bar-not-marked { fill: var(--color-not-marked); .bar-not-found { fill: var(--color-not-found); } .bar-no-snow { fill: var(--color-no-snow); } .chart-text { Loading
src/store/getters.js +15 −2 Original line number Diff line number Diff line Loading @@ -330,7 +330,7 @@ export default { } return result }, statsNotMarked: state => (cameraID, stickID) => { statsNotFound: state => (cameraID, stickID) => { let result = 0 if (!state.chronology[cameraID]) { return result Loading @@ -338,7 +338,20 @@ export default { for (const imageName of state.chronology[cameraID].order) { const stick = state.data[cameraID][imageName].sticks[stickID] const image = state.data[cameraID][imageName] if (!stick.visible || image.weatherConditions === 0) { if (!stick.visible && image.weatherConditions !== 0) { result += 1 } } return result }, statsNoSnow: state => cameraID => { let result = 0 if (!state.chronology[cameraID]) { return result } for (const imageName of state.chronology[cameraID].order) { const image = state.data[cameraID][imageName] if (image.weatherConditions === 0) { result += 1 } } Loading