Display charts using MAX() or SUM()

Hi everyone,

As mentioned in the post, the Graph widget currently uses an average function by default when the number of data points exceeds the display capacity (currently limited to 300 points per chart).

For example, if you display a month of rainfall with 10 measurements per hour, that’s 7200 values… which are then averaged into only 300 points. That’s clearly not optimal for all types of data!

To address this need, I’m proposing an update to the widget with a new parameter :backhand_index_pointing_down:

The default function remains « Average », but you can select sum, maximum, minimum or count (a COUNT in SQL).

I’m providing a Docker image with this change:

gladysassistant/gladys:dashboad-add-other-aggregate-functions

:warning: Warning: this PR is not production-compatible, because it modifies the database, so I don’t recommend running this image on your production environment.

:backhand_index_pointing_right: Tutorial: How to run a test Docker image?

And the associated PR:

Feedback is welcome as always! :blush:

1 Like