# HG changeset patch # User Fadi Abbud # Date 1564656513 -7200 # Node ID 4d7569cca5e69bda319eb307a5a170c8ac42f63b # Parent 0becdd2812c92ae163dfce2a5afa9c96e6e0ced5 client: fix rendering of nash-sutcliffe lines on pdf diff -r 0becdd2812c9 -r 4d7569cca5e6 client/src/components/gauge/Waterlevel.vue --- a/client/src/components/gauge/Waterlevel.vue Thu Aug 01 12:20:07 2019 +0200 +++ b/client/src/components/gauge/Waterlevel.vue Thu Aug 01 12:48:33 2019 +0200 @@ -838,19 +838,27 @@ "stroke-opacity", scale.x.domain()[1] - scale.x.domain()[0] > 90 * 86400000 ? 0 : 1 ); - return d3 .area() .x(d => scale.x(d)) .y0(() => dimensions.mainHeight + 0.5) - .y1(() => dimensions.mainHeight - 15 * (hours / 24)); + .y1( + () => + dimensions.mainHeight - + Math.floor(0.06 * dimensions.mainHeight) * (hours / 24) + ); }; const nashSutcliffeLabel = (label, date, hours) => { let days = hours / 24; label .attr("x", Math.min(scale.x(date), dimensions.width) - 4) - .attr("y", dimensions.mainHeight - (15 * days + 0.5) + 12); + .attr( + "y", + dimensions.mainHeight - + (Math.floor(0.06 * dimensions.mainHeight) * days + 0.5) + + 12 + ); }; if (coeff.samples) {