Mercurial > gemma
comparison client/src/components/fairway/Fairwayprofile.vue @ 4672:c7dc1a6da93d
fairway_profile: calculate scales
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 15 Oct 2019 15:55:12 +0200 |
parents | 0cc339c4c356 |
children | 3b7de89527a3 |
comparison
equal
deleted
inserted
replaced
4671:0cc339c4c356 | 4672:c7dc1a6da93d |
---|---|
526 .rangeRound([0, width]); | 526 .rangeRound([0, width]); |
527 | 527 |
528 let yScaleRight = d3 | 528 let yScaleRight = d3 |
529 .scaleLinear() | 529 .scaleLinear() |
530 .domain([ | 530 .domain([ |
531 this.maxAlt * 1.1 + | 531 this.maxAlt * 1.1 + (this.waterlevel - this.refWaterlevel) / 100, |
532 Math.abs(this.waterlevel - this.refWaterlevel) / 100, | |
533 -(this.maxAlt * 0.1) | 532 -(this.maxAlt * 0.1) |
534 ]) | 533 ]) |
535 .rangeRound([height, 0]); | 534 .rangeRound([height, 0]); |
536 | 535 |
537 let yScaleLeft = d3 | 536 let yScaleLeft = d3 |
538 .scaleLinear() | 537 .scaleLinear() |
539 .domain([ | 538 .domain([ |
540 this.waterlevel - | 539 this.waterlevel - |
541 (this.maxAlt * 100 + | 540 (this.maxAlt * 100 + (this.waterlevel - this.refWaterlevel)), |
542 Math.abs(this.waterlevel - this.refWaterlevel)), | |
543 this.waterlevel + this.maxAlt * 0.1 * 100 | 541 this.waterlevel + this.maxAlt * 0.1 * 100 |
544 ]) | 542 ]) |
545 .rangeRound([height, 0]); | 543 .rangeRound([height, 0]); |
546 | 544 |
547 let xAxis = d3 | 545 let xAxis = d3 |