Mercurial > gemma
changeset 3213:b3a1ecdda797
available_fairway_depth: hours in days
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 09 May 2019 10:52:54 +0200 |
parents | f87fd173f750 |
children | 861329d535b2 |
files | client/src/components/fairway/AvailableFairwayDepth.vue |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepth.vue Thu May 09 10:34:09 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepth.vue Thu May 09 10:52:54 2019 +0200 @@ -32,6 +32,8 @@ import { mapState } from "vuex"; import filters from "@/lib/filters.js"; +const hoursInDays = x => x / 24; + export default { mixins: [diagram], data() { @@ -138,7 +140,7 @@ .append("rect") .attr("y", this.yScale(0)) .attr("height", d => { - return this.yScale(0) - this.yScale(d); + return this.yScale(0) - this.yScale(hoursInDays(d)); }) .attr("width", this.barsWidth) .attr("fill", (d, i) => { @@ -146,7 +148,7 @@ }); }, fnheight(name) { - return d => this.yScale(0) - this.yScale(d[name]); + return d => this.yScale(0) - this.yScale(hoursInDays(d[name])); }, drawLDC(everyBar) { const height = this.fnheight("ldc");