# HG changeset patch # User Thomas Junk # Date 1557391974 -7200 # Node ID b3a1ecdda797de8b91f035b39413e5bb8c7d78de # Parent f87fd173f7507724a7cdca43c0dfb9e029b5e095 available_fairway_depth: hours in days diff -r f87fd173f750 -r b3a1ecdda797 client/src/components/fairway/AvailableFairwayDepth.vue --- 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");