annotate client/docs/developers.md @ 4334:8ac59c8183e8

client: add showNumbers to AvailableFairwayDepth diagram * Add bootstrap button to the diagram legend. Below the the other options because of its lesser importance. * Change calculation of days from hours to use one precision after the decimal point to show that we are coming from summed hours. This shall lead to clarification what users expect, see code comment. * Draw the numbers close to the bars: Above for LDC and highestLevel, below for the "lowerLevels". * Enchance test data in docs/developers.md to cover more interesting cases.
author Bernhard Reiter <bernhard@intevation.de>
date Thu, 05 Sep 2019 14:50:05 +0200
parents 83eb99662a91
children dc5a10542e16
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4327
b372fbe15300 client: refactor dev documentation
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
1 When developing wamos, check out
b372fbe15300 client: refactor dev documentation
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
2
b372fbe15300 client: refactor dev documentation
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
3 * [How translations are handled](dev-translations.md)
b372fbe15300 client: refactor dev documentation
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
4 * [Rationale of some choices](dev-generalconsiderations.md)
4329
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
5
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
6 ## Hints
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
7
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
8 When testing the vuex store object can be accessed from the
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
9 webbrowsers console like
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
10
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
11 ```javascript
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
12 store = document.getElementsByTagName('a')[0].__vue__.$store
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
13 ```
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
14
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
15 This allows for setting test values where getting real test data
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
16 is complicated. For example testing the diagramm for the
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
17 fairwayavailability (tested with Chromium 73 und gemma-2019-09-04):
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
18
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
19 ```javascript
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
20 data = store.state.fairwayavailability.csv
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
21
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
22 data=`#time,# < LDC (164.0) [h],# >= LDC (164.0) [h],# < 230.0 [h],# >= 230.0 [h],# >= 250.0 [h]
4334
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
23 01-2019,0 ,744, 0, 0,744
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
24 02-2019,324,324,150,174,324
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
25 03-2019, 24,696, 80, 45, 50
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
26 04-2019,120,600, 24, 24,672.5
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
27 05-2019,140,80 , 80, 45, 50
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
28 06-2019, 0, 0, 0, 0, 0.000
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
29 07-2019, 0,300, 0, 0, 0
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
30 08-2019, 0, 0,744, 0, 0
8ac59c8183e8 client: add showNumbers to AvailableFairwayDepth diagram
Bernhard Reiter <bernhard@intevation.de>
parents: 4329
diff changeset
31 09-2019, 0,720, 0, 96,624
4329
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
32 `
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
33
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
34 store.commit("fairwayavailability/setAvailableFairwayDepthData", data)
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
35 ```
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
36
83eb99662a91 client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents: 4327
diff changeset
37 (Depends on the code structure in store/fairwayavailability.js.)