Mercurial > gemma
comparison client/src/components/fairway/Fairwayprofile.vue @ 3576:1109a38f7ff1
client: waterlevel format in diagrams changed from cm to m and localized
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 03 Jun 2019 16:58:02 +0200 |
parents | 9e296d686f16 |
children | 309084558808 |
comparison
equal
deleted
inserted
replaced
3575:818cc2deff98 | 3576:1109a38f7ff1 |
---|---|
210 : "Current"; | 210 : "Current"; |
211 if (this.additionalSurvey) dates.push(this.additionalSurvey.date_info); | 211 if (this.additionalSurvey) dates.push(this.additionalSurvey.date_info); |
212 dates.map(d => this.$options.filters.dateTime(d, true)); | 212 dates.map(d => this.$options.filters.dateTime(d, true)); |
213 return `${this.$gettext("Fairwayprofile")}: ${ | 213 return `${this.$gettext("Fairwayprofile")}: ${ |
214 this.selectedBottleneck | 214 this.selectedBottleneck |
215 } (${dates.join(", ")}) WL: ${waterlevelLabel} (${this.waterlevel} cm)`; | 215 } (${dates.join( |
216 ", " | |
217 )}) WL: ${waterlevelLabel} (${this.$options.filters.waterlevel( | |
218 this.waterlevel | |
219 )} m)`; | |
216 }, | 220 }, |
217 currentData() { | 221 currentData() { |
218 if ( | 222 if ( |
219 !this.selectedSurvey || | 223 !this.selectedSurvey || |
220 !this.currentProfile.hasOwnProperty(this.selectedSurvey.date_info) | 224 !this.currentProfile.hasOwnProperty(this.selectedSurvey.date_info) |
578 .attr("transform", ["rotate(-90)"]) | 582 .attr("transform", ["rotate(-90)"]) |
579 .attr("y", -50) | 583 .attr("y", -50) |
580 .attr("x", -(this.height - this.margin.top - this.margin.bottom) / 2) | 584 .attr("x", -(this.height - this.margin.top - this.margin.bottom) / 2) |
581 .attr("fill", "black") | 585 .attr("fill", "black") |
582 .style("text-anchor", "middle") | 586 .style("text-anchor", "middle") |
583 .text("Waterlevel [cm]"); | 587 .text("Waterlevel [m]"); |
584 graph | 588 graph |
585 .append("text") | 589 .append("text") |
586 .attr("y", -50) | 590 .attr("y", -50) |
587 .attr("x", -(height / 4)) | 591 .attr("x", -(height / 4)) |
588 .attr("dy", "1em") | 592 .attr("dy", "1em") |
619 ]) | 623 ]) |
620 .rangeRound([height, 0]); | 624 .rangeRound([height, 0]); |
621 | 625 |
622 let xAxis = d3.axisBottom(xScale).ticks(5); | 626 let xAxis = d3.axisBottom(xScale).ticks(5); |
623 let yAxisRight = d3.axisRight(yScaleRight); | 627 let yAxisRight = d3.axisRight(yScaleRight); |
624 let yAxisLeft = d3.axisLeft(yScaleLeft); | 628 let yAxisLeft = d3 |
629 .axisLeft(yScaleLeft) | |
630 .tickFormat(d => this.$options.filters.waterlevel(d)); | |
625 | 631 |
626 let graph = svg | 632 let graph = svg |
627 .append("g") | 633 .append("g") |
628 .attr( | 634 .attr( |
629 "transform", | 635 "transform", |