# Amélioration des graphiques

**URL:** <https://community.gladysassistant.com/t/amelioration-des-graphiques/8954>\
**Category:** Développement\
**Created:** [Mai 23, 2024, 8:51 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954 "2024-05-23T20:51:31Z")\
**Posts on this page:** 11\
**Page:** 9

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Août 30, 2024, 2:07 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/161 "2024-08-30T14:07:05Z")

</div>

Erreur 404 ça me paraît bien !

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [Août 31, 2024, 8:54 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/162 "2024-08-31T08:54:45Z")

</div>

C’est en cours !!  
Par contre on perd tellement de place 😅

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/8/a/8a9e2ccf912205250897e0d407bf240d17679824.png)

Les perfs sont complètement différentes avec DuckDB :

- 1 heure = 184 states  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/5/1/51c7aa843f10808788859a50048746aae0a8ad07.png)
- passage à 24h = 1560 states  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/b/4/b42153d59326da9ef65300cb8f1a5b2592df5155.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/1/2/1259c9030176acc028a8cc2d65c77156d19b556c.png)
- passage à 7 jours = 3700 states  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/5/5/55111b8e3632d998e8e8d69fc6b3d557bff63b7a.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/8/5/8586f9dfff430818df64c198a284b8caac3ca83f.png)
- passage à 3 mois = 37300 states (bon par contre ensuite la navigation à ce stade) et si plusieurs device c est chaud.  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/0/3/037295c6adf821fb2ce7b2da3c04b0253223dcaf.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/b/1/b1d03b76b1b1e61a71639068fb28ab3ec3da61d1.png)

Je propose :

- 24h et moins pas de limite de points
- Au-dela : 4000 points / nombre de features à afficher
- Lors d’un zoom on recalcule pour être de plus en plus précis
- Un dropdown de sélection pour affichage par agrégat (comme sur Metabase)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/7/2/7238c535ecc133888109c9780f772bad61dd5119.png)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Septembre 2, 2024, 7:21 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/163 "2024-09-02T07:21:27Z")

</div>

> [@Terdious](#):
>
> Par contre on perd tellement de place 😅

C’est pas une fatalité !

> [@Terdious](#):
>
> - 24h et moins pas de limite de points
> - Au-dela : 4000 points / nombre de features à afficher

Pourquoi ne pas juste mettre une limite partout ? 4000 points ça me parait abusé par contre, actuellement sur le tableau de bord on en affiche 200

> [@Terdious](#):
>
> Lors d’un zoom on recalcule pour être de plus en plus précis

Yes! mais toujours avec la même limite

En fait il faut juste garder exactement la même requête que sur le dashboard, mais en demandant plus de points, et en ayant la possibilité de spécifier une période et pas juste une durée

> [@Terdious](#):
>
> Un dropdown de sélection pour affichage par agrégat (comme sur Metabase)

Yes carrément !

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [Septembre 2, 2024, 7:31 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/164 "2024-09-02T07:31:25Z")

</div>

Parfait

> [@pierre-gilles](#):
>
> Pourquoi ne pas juste mettre une limite partout ? 4000 points ça me parait abusé par contre, actuellement sur le tableau de bord on en affiche 200

Oki, je vois ce que ça donne avec 1000 points.

> [@pierre-gilles](#):
>
> > [@Terdious](#):
> >
> > Par contre on perd tellement de place 😅
> 
> C’est pas une fatalité !

Oki, on verra cela plus tard alors ^^

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [Septembre 3, 2024, 5:53 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/165 "2024-09-03T17:53:56Z")

</div>

> [@guim31](#):
>
> Oui j’avais compris ça, mais je suis impatient quand même. En fait je trouve que la partie affichage des graphiques necessitait surtout la possibilité de les afficher en plus grand, et là c’est le top pour moi !
> 
> Entre ça et les capteurs binaires, je suis comblé par ces derniers dev !! 😉

> [@Terdious](#):
>
> > [@pierre-gilles](#):
> >
> > `min-width: 0px;`
> 
> C’est push !!  
> Merci beaucoup pour ton aide

PR choix du nombre de colonnes sur le dashboard en test Gladys Plus sur [https://terdious-add-choice-number-col.pages.dev/](https://terdious-add-choice-number-col.pages.dev/) pour les intéressés !!^^

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [Septembre 3, 2024, 7:15 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/166 "2024-09-03T19:15:50Z")

</div>

> [@Terdious](#):
>
> Je commence à reprendre celle-ci en parallèle :
> 
> > [@Terdious](#):
> >
> > Normalement tu peux review également la PR [Add expand charts dashboard by Terdious · Pull Request #2096 · GladysAssistant/Gladys · GitHub](https://github.com/GladysAssistant/Gladys/pull/2096). Mais comme elle est prise sur la PR des courbes binaires, je supposes que tu préféreras attendre que l’autre soit merge. Bref pour info

Et enfin la vue étendue des graphiques :  
[https://terdious-add-expand-charts.pages.dev/](https://terdious-add-expand-charts.pages.dev/)  
Attention ⚠ ! En cours de construction (non pleinement fonctionnelle et design non définitif). Permet de se rendre compte du dev en cours. Je l’ai mis en build auto, donc sera mis à jour au fur et à mesure de l’avancement.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Octobre 4, 2024, 1:37 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/167 "2024-10-04T01:37:05Z")

</div>

Salut @Terdious et merci pour toutes tes PR 🙏

J’ai fais une série de review ce matin :

J’ai mergé ta PR sur le nombre de colonnes dynamiques sur le tableau de bord :

> <https://github.com/GladysAssistant/Gladys/pull/2097>
>
> \### 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:
> 
> \- ~~If your changes affects code, did your write the tests?~~
> \- ~~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.
> \- \[\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Adding the deletion or addition of columns to the dashboard

Petit retour sur ta PR qui ajuste la taille des graphiques :

> <https://github.com/GladysAssistant/Gladys/pull/2117#pullrequestreview-2346898329>
>
> …d on additional features
> 
> \### Pull Request check-list
> 
> To ensure your Pull …Request can be accepted as fast as possible, make sure to review and check all of these items:
> 
> \- ~~If your changes affects code, did your write the tests?~~
> \- ~~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)
> \- ~~If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)~~
> \- ~~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.~~
> \- \[x\] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
> \- ~~If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).~~
> \- ~~Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).~~
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Small PR to increase the height of the charts depending on the number of features selected. Currently the curve is squashed to make room for the legend and contain the size of the box.

Pour la PR sur les appareils binaires, j’ai quelques retours mais rien de sérieux.  
Tout fonctionne bien en local chez moi !

> <https://github.com/GladysAssistant/Gladys/pull/2094#pullrequestreview-2346910900>
>
> \### 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)
> \- \[x\] Is the linter passing? (\`npm run eslint\` on both front)
> \- \[x\] Did you run prettier? (\`npm run prettier\` on both front)
> \- \[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.
> \- \[\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Taken from the original PR: #Binary graph #1948 
> Thanks to @callemand for all the work done

Merci encore pour ces PRs qui vont clairement plaire à un paquet de monde, moi le premier 🙂

N’hésite pas si tu as des questions pour les retours

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [Octobre 4, 2024, 8:05 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/168 "2024-10-04T08:05:07Z")

</div>

Salut @pierre-gilles, aucune question, merci pour les review.  
Tout est corrigé / répondu.

---

<div class="post-metadata">

**Author:** ![zedyxer](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/zedyxer/32/13458_2.png) [@zedyxer](https://community.gladysassistant.com/u/zedyxer)\
**Post date:** [Octobre 4, 2024, 9:08 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/169 "2024-10-04T09:08:10Z")

</div>

Un gros merci pour votre travail messieurs ^^  
les graphiques binaires vont me supprimer un paquet de flow nodered, j’adore !

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Octobre 7, 2024, 3:33 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/170 "2024-10-07T03:33:57Z")

</div>

@Terdious Merci pour tes retours 🙏

J’ai mergé la PR sur les graphiques binaires ! Pour l’autre PR, du coup il y a un conflit avec les graphiques binaires vu que ça touche à la même chose. Est-ce que tu peux corriger le conflit ? 🙂

Edit: Build en cours de Gladys Assistant 4.46.0. Sorti dans 4h !

> <https://github.com/GladysAssistant/Gladys/actions/runs/11208245077>

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [Octobre 7, 2024, 7:15 UTC](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954/171 "2024-10-07T07:15:59Z")

</div>

Top !!

Conflit corrigé et testé.

[Page précédente](https://community.gladysassistant.com/t/amelioration-des-graphiques/8954.md?page=8)
