OpenEnergyDashboard / OED

Open Energy Dashboard (OED)
Mozilla Public License 2.0
73 stars 252 forks source link

maps handling negative values better #1205

Open huss opened 2 months ago

huss commented 2 months ago

Describe the bug

Originally, OED did not have negative readings but it is now allowed. If you place a negative value on a map, you see no circle. If you place the cursor over the expected location you see the correct hover. This screenshot shows this:

image

The issue is likely that src/client/app/containers/MapChartContainer.ts finds the max size where it should probably use the max - min size or something like this.

Another option might be to use another visual for negative (lines through color circle or something else) so it is clear to the user that some values are negative. This would be combined with fixing the actual size.

If others have thoughts about the look then please state them. The ideas here would have larger negative values have smaller circles.

To Reproduce

Steps to reproduce the behavior (assuming you have the usual developer testData loaded):

  1. Create a new meter where the important values are:

image

  1. Place these values in a CSV file for the readings:

reading,start time,end time -10,2023-01-01 00:00:00,2024-01-01 00:00:00

and do a CSV Readings upload where you specify the meter (from step 1), header row and refresh the daily/hourly readings, along with the CSV created in this step.

  1. Go to the map and graph this meter.
  2. Place cursor over Library to see

Note the provided CSV reading value is a constant -10 across all of 2023. It could be modified to get other values. If you want to place a circle in another location, looking at the location/GPS value for the amp meters will help.

Expected behavior

The circle size should be visible and scale with usage.

Additional context

None