Mercurial > gemma
diff client/src/components/fairway/AvailableFairwayDepthLNWL.vue @ 3368:70605404f37d
fa_lnwl: prototypical diagram added
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 22 May 2019 11:00:25 +0200 |
parents | 8974efd71917 |
children | ccb5455f0713 |
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepthLNWL.vue Wed May 22 10:47:04 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepthLNWL.vue Wed May 22 11:00:25 2019 +0200 @@ -421,7 +421,30 @@ .append("g") .attr("transform", `translate(0 ${this.paddingTop})`); }, - drawBars() {}, + drawBars() { + this.drawLNWL(); + }, + drawLNWL() { + let lnwl = this.diagram + .append("g") + .attr("transform", `translate(${this.paddingRight})`); + lnwl + .selectAll("rect") + .data(this.fwLNWLData.lnwl) + .enter() + .append("rect") + .attr("height", d => { + return this.yScale(0) - this.yScale(d.percent); + }) + .attr("y", d => { + return this.yScale(d.translateY); + }) + .attr("width", this.barsWidth) + .attr("fill", d => { + if (d.level === "LDC") return "#aaaaaa"; + return "#3333cc"; + }); + }, drawScaleLabel() { const center = this.dimensions.mainHeight / 2; this.diagram