Mercurial > gemma
comparison client/src/components/fairway/AvailableFairwayDepth.vue @ 3476:cc11f207e060
afd: omit legend generation from CSV. Legend is generated from known inputs
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 27 May 2019 13:10:05 +0200 |
parents | dfa97aad1134 |
children | ba26adce0ce8 |
comparison
equal
deleted
inserted
replaced
3475:45104cc6fd50 | 3476:cc11f207e060 |
---|---|
181 "selectedFairwayAvailabilityFeature", | 181 "selectedFairwayAvailabilityFeature", |
182 "fwData", | 182 "fwData", |
183 "from", | 183 "from", |
184 "to", | 184 "to", |
185 "frequency", | 185 "frequency", |
186 "legend", | 186 "csv", |
187 "csv" | 187 "depthlimit1", |
188 "depthlimit2", | |
189 "widthlimit1", | |
190 "widthlimit2" | |
188 ]), | 191 ]), |
192 legend() { | |
193 const d = [this.depthlimit1, this.depthlimit2].sort(); | |
194 const w = [this.widthlimit1, this.widthlimit2].sort(); | |
195 const lowerBound = [d[0], w[0]].filter(x => x).join(", "); | |
196 const upperBound = [d[1], w[1]].filter(x => x).join(", "); | |
197 return [ | |
198 `> LDC`, | |
199 `< ${lowerBound}`, | |
200 `< ${upperBound}`, | |
201 `>= ${upperBound}` | |
202 ]; | |
203 }, | |
189 dataLink() { | 204 dataLink() { |
190 return `data:text/csv;charset=utf-8, ${encodeURIComponent(this.csv)}`; | 205 return `data:text/csv;charset=utf-8, ${encodeURIComponent(this.csv)}`; |
191 }, | 206 }, |
192 csvFileName() { | 207 csvFileName() { |
193 return `${this.$gettext("fairwayavailability")}-${ | 208 return `${this.$gettext("fairwayavailability")}-${ |