DLR-SC / ESID

This is the repository to the ESID frontend for visualization of infectious disease propagation.
Apache License 2.0
15 stars 3 forks source link

Setting to show horizontal indicator #264

Open NXXR opened 1 year ago

NXXR commented 1 year ago

Add settings to the line chart to be able to add a horizontal range at an arbitrary value in the line chart. (i.e. to show the maximum occupancy rate for hospitalizations/ICU)

The value is stored with the selected district and compartment so it can be persisted and recovered after changing districts/compartments.
The setting should also be shown in a list to be easily removed without the need to go back to the specific district/compartment combination.


Waiting on

lenarothenhaeusler commented 1 year ago
  1. Possible to set an arbitrary value just for a specific county and a specific compartment?
  2. Are different values for different compartments possible?
NXXR commented 1 year ago
  1. Possible to set an arbitrary value just for a specific county and a specific compartment? Yes

  2. Are different values for different compartments possible? Yes


Generally, a value indicator would be specific to the Line diagram is is attached to (so for a specific district & specific compartment).
The chart is redrawn with the new information when a different district or compartment is selected (or currently when some other part in the data changes like a scenario is deactivated).

The indicators would just vanish on a redraw.
A persistent solution would be to save the value together with the district and/or compartment in the data store.
This way when redrawing the line chart, we can check if there is a value stored for the combination of district and compartment and restore the indicator when creating the new line chart.

lenarothenhaeusler commented 1 year ago

Sounds good, thanks for your answer Moritz! I just checked in our GitLab issues and this issue here is connected to https://gitlab.hzdr.de/loki/loki-support/-/issues/44 The LHAs asked also specifically to set the value on their own. They also asked for a push message if this specific vale is exceeded.

NXXR commented 1 year ago

I just checked the gitlab issue.

In the website we can offer the user the possibility to set their own value (I would stick to a single value/line for now which makes housekeeping easier and avoids clutter in the line chart).

We can also color the lines above that threshold in a specific color (by attaching the guide also to the series), and/or show a toast/pop-up if there are values above the threshold in the line chart, but I'm not sure if it's necessary since it would be immediately visible on the chart.

lenarothenhaeusler commented 1 year ago

You can do it without showing a toast/pop-up for now then. We can wait for the LHA's feedback to this feature.