comparison client/src/components/fairway/AvailableFairwayDepthLNWL.vue @ 3386:0ba142a4bf43

afdlnwl: colors
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 22 May 2019 16:13:38 +0200
parents 540ef09bd6bc
children 1876b204b004
comparison
equal deleted inserted replaced
3385:e994565a59a1 3386:0ba142a4bf43
435 this.drawAFD(); 435 this.drawAFD();
436 }, 436 },
437 drawAFD() { 437 drawAFD() {
438 let afd = this.diagram 438 let afd = this.diagram
439 .append("g") 439 .append("g")
440 .attr("transform", `translate(${this.paddingRight + this.barsWidth})`); 440 .attr(
441 "transform",
442 `translate(${this.paddingRight + this.barsWidth / 2})`
443 );
441 afd 444 afd
442 .selectAll("rect") 445 .selectAll("rect")
443 .data(this.fwLNWLData.afd) 446 .data(this.fwLNWLData.afd)
444 .enter() 447 .enter()
445 .append("rect") 448 .append("rect")
509 return this.yScale(0) - this.yScale(d.percent); 512 return this.yScale(0) - this.yScale(d.percent);
510 }) 513 })
511 .attr("y", d => { 514 .attr("y", d => {
512 return this.yScale(d.translateY); 515 return this.yScale(d.translateY);
513 }) 516 })
514 .attr("width", this.barsWidth) 517 .attr("width", this.barsWidth / 2)
515 .attr("fill", d => { 518 .attr("fill", d => {
516 return this.$options.LWNLCOLORS[d.level]; 519 return this.$options.LWNLCOLORS[d.level];
517 }); 520 });
518 }, 521 },
519 drawScaleLabel() { 522 drawScaleLabel() {
550 }, 553 },
551 LEGEND: app.$gettext("Percent"), 554 LEGEND: app.$gettext("Percent"),
552 AFDCOLORS: ["#782121", "#ff6c6c", "#3675ff"], 555 AFDCOLORS: ["#782121", "#ff6c6c", "#3675ff"],
553 LWNLCOLORS: { 556 LWNLCOLORS: {
554 LDC: "#aaaaaa", 557 LDC: "#aaaaaa",
555 HDC: "#ff6600" 558 HDC: "#43FFE1"
556 } 559 }
557 }; 560 };
558 </script> 561 </script>