comparison client/src/components/fairway/AvailableFairwayDepth.vue @ 3347:cd745be63f71

available_fairway_depth: draw lower levels refactored
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 21 May 2019 11:48:15 +0200
parents d5dbfba9faae
children ac0006f675c0
comparison
equal deleted inserted replaced
3346:83210507aaca 3347:cd745be63f71
465 everyBar 465 everyBar
466 .selectAll("g") 466 .selectAll("g")
467 .data(d => d.lowerLevels) 467 .data(d => d.lowerLevels)
468 .enter() 468 .enter()
469 .append("rect") 469 .append("rect")
470 .attr("y", this.yScale(0)) 470 .attr("y", d => {
471 return 2 * this.yScale(0) - this.yScale(hoursInDays(d.translateY));
472 })
471 .attr("height", d => { 473 .attr("height", d => {
472 return this.yScale(0) - this.yScale(hoursInDays(d)); 474 return this.yScale(0) - this.yScale(hoursInDays(d.height));
473 }) 475 })
474 .attr("width", this.barsWidth) 476 .attr("width", this.barsWidth)
475 .attr("fill", (d, i) => { 477 .attr("fill", (d, i) => {
476 return this.$options.COLORS.REST[i]; 478 return this.$options.COLORS.REST[i];
477 }); 479 });