Mercurial > gemma
comparison client/docs/developers.md @ 4352:6365466ead83
client, docs: add example for diagram testing
* Add example for AvailableFairwayDepthLNWLDiagram, where data is set
directly in the browser.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Mon, 09 Sep 2019 14:43:49 +0200 |
parents | dc5a10542e16 |
children | d6439e7c8b1c |
comparison
equal
deleted
inserted
replaced
4351:47aa3be2a7de | 4352:6365466ead83 |
---|---|
32 This allows for setting test values where getting real test data | 32 This allows for setting test values where getting real test data |
33 is complicated. For example testing the diagramm for the | 33 is complicated. For example testing the diagramm for the |
34 fairwayavailability (tested with Chromium 73 und gemma-2019-09-04): | 34 fairwayavailability (tested with Chromium 73 und gemma-2019-09-04): |
35 | 35 |
36 ```javascript | 36 ```javascript |
37 data = store.state.fairwayavailability.csv | 37 data = store.state.fairwayavailability.csv // see current data |
38 | 38 |
39 data=`#time,# < LDC (164.0) [h],# >= LDC (164.0) [h],# < 230.0 [h],# >= 230.0 [h],# >= 250.0 [h] | 39 data=`#time,# < LDC (164.0) [h],# >= LDC (164.0) [h],# < 230.0 [h],# >= 230.0 [h],# >= 250.0 [h] |
40 01-2019,0 ,744, 0, 0,744 | 40 01-2019,0 ,744, 0, 0,744 |
41 02-2019,324,324,150,174,324 | 41 02-2019,324,324,150,174,324 |
42 03-2019, 24,696, 80, 45, 50 | 42 03-2019, 24,696, 80, 45, 50 |
49 ` | 49 ` |
50 | 50 |
51 store.commit("fairwayavailability/setAvailableFairwayDepthData", data) | 51 store.commit("fairwayavailability/setAvailableFairwayDepthData", data) |
52 ``` | 52 ``` |
53 | 53 |
54 Or for the AvailableFairwayDepthLNWLDiagram: | |
55 ```javascript | |
56 data = store.state.fairwayavailability.csv // see current data | |
57 | |
58 data=` | |
59 #time,# < LDC (162.0) [h],# >= LDC (162.0) [h],#d < 230.0 [%],#d >= 230.0 [%],#d >= 250.0 [%] | |
60 09-2018,100, 0,100 , 0, 0 | |
61 10-2018,100, 0, 80 , 20, 0 | |
62 11-2018,100, 0, 0 , 100, 0 | |
63 12-2018, 80, 20, 50 , 50, 0 | |
64 01-2019, 70, 30, 15 , 60, 25 | |
65 02-2019, 65, 35, 40 , 40, 20 | |
66 03-2019, 55, 45, 42 , 42, 16 | |
67 04-2019, 42, 58, 40 , 20 , 40 | |
68 05-2019, 30, 70, 2 , 30 , 68 | |
69 06-2019, 30, 70, 0 , 25 , 75 | |
70 07-2019, 20, 80, 25 , 0 , 75 | |
71 08-2019, 0,100, 10.1, 1.5, 88.4 | |
72 09-2019, 0,100, 23.5, 2.4, 74.1 | |
73 ` | |
74 | |
75 store.commit("fairwayavailability/setAvailableFairwayDepthLNWLData", data) | |
76 ``` | |
77 | |
78 | |
54 (Depends on the code structure in store/fairwayavailability.js.) | 79 (Depends on the code structure in store/fairwayavailability.js.) |