Pequeño bonus en esta nueva funcionalidad
Poder elegir la función de agregación está bien… ¡pero no es suficiente!
Creo que es esencial poder también agrupar los valores por intervalos de tiempo : por hora, por día, por semana, por mes, e incluso por año.
Por eso les propongo una nueva opción en los gráficos que permite este agrupamiento temporal:
Como la edición del widget se volvía un poco larga para los gráficos, también he añadido un botón para ocultar por defecto las opciones avanzadas . El usuario puede así desplegarlas solo si lo necesita:
Con este desarrollo, cubrimos todos los casos de uso :
Suma de valores por día (agrupar por día + función “suma”)
Contar el número de valores enviados por un sensor por semana
Promedio de temperatura por mes
¡Y mucho más!
En resumen: ¡todo es posible ahora!
La PR:
master ← chart-add-grouping
ouvert 08:05AM - 10 May 25 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [x] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([french forum](https://community.gladysassistant.com/)/[english forum](https://en-community.gladysassistant.com/)) for testing before merging.
### Description of change
Add group by in charts
https://community.gladysassistant.com/t/graphiques-afficher-cumul-valeur-par-jours-semaine-mois-annee/7106/10
https://community.gladysassistant.com/t/pouvoir-afficher-les-graphiques-en-max-ou-en-somme/7682/5?u=pierre-gilles