Mercurial > gemma
comparison client/src/fairway/Fairwayprofile.vue @ 802:327aa4a18a1c
Fairway profile WIP
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 27 Sep 2018 13:36:43 +0200 |
parents | 1bee00039973 |
children | 30ff051e75e9 |
comparison
equal
deleted
inserted
replaced
801:b6a1779ffb42 | 802:327aa4a18a1c |
---|---|
44 "xScale", | 44 "xScale", |
45 "yScaleLeft", | 45 "yScaleLeft", |
46 "yScaleRight", | 46 "yScaleRight", |
47 "margin", | 47 "margin", |
48 "totalLength", | 48 "totalLength", |
49 "waterLevels" | 49 "waterLevels", |
50 "fairwayCoordinates" | |
50 ], | 51 ], |
51 computed: { | 52 computed: { |
52 waterColor() { | 53 waterColor() { |
53 const result = this.waterLevels.find( | 54 const result = this.waterLevels.find( |
54 x => x.level === this.selectedWaterLevel | 55 x => x.level === this.selectedWaterLevel |
73 }, | 74 }, |
74 waterLevels() { | 75 waterLevels() { |
75 this.drawDiagram(); | 76 this.drawDiagram(); |
76 }, | 77 }, |
77 selectedWaterLevel() { | 78 selectedWaterLevel() { |
79 this.drawDiagram(); | |
80 }, | |
81 fairwayCoordinates() { | |
78 this.drawDiagram(); | 82 this.drawDiagram(); |
79 } | 83 } |
80 }, | 84 }, |
81 methods: { | 85 methods: { |
82 drawDiagram() { | 86 drawDiagram() { |
115 yScaleLeft, | 119 yScaleLeft, |
116 currentData, | 120 currentData, |
117 height, | 121 height, |
118 width | 122 width |
119 }); | 123 }); |
124 this.drawFairway({ | |
125 graph, | |
126 xScale, | |
127 yScaleLeft, | |
128 currentData, | |
129 height, | |
130 width | |
131 }); | |
132 }, | |
133 drawFairway() { | |
134 console.log(this.fairwayCoordinates); | |
120 }, | 135 }, |
121 drawLabels({ graph, height }) { | 136 drawLabels({ graph, height }) { |
122 graph | 137 graph |
123 .append("text") | 138 .append("text") |
124 .attr("transform", "rotate(-90)") | 139 .attr("transform", "rotate(-90)") |