Affichage graphique avec des données erronées

Des fois quand j’ouvre un dashboard qui contient un graphique avec 2 courbes, j’ai des valeurs erronées.

Par exemple sur cette image la courbe rouge est environ a 36°C alors qu’en réalité elle est a 16°C.(température de consigne)

Si je réactualise la page la courbe rouge revient sur sa valeur réelle.

Suis-je le seul avec ce phénomène ?

De mon côté cela ne m’est jamais arrivé non :confused:

Après ce qui est bizarre c’est que cela n’arrive pas souvent et uniquement sur 2 graphiques.
Les autres graphiques que j’ai je n’ai jamais eu le cas. Ceux là je n’ai peut-être pas fait attention.

Pareil, je n’ai jamais remarqué ce bug.

Je viens encore d’avoir le cas.


Ensuite en rafraîchissant la page du navigateur les valeurs reviennent a la normale ( ou pas car l’humidité dans mon garage reste encore élevée, j’ai une infiltration d’eau…:sob:)

160% d’humidité c’est pas mal :smiley:

C’est clair ca fait un peu beaucoup.

Le problème est récurrent et sur tous les graphiques en faite.

Encore un autre exemple a l’ouverture de la page.

Après rafraîchissement de la page cela s’affiche correctement

Salut @_Will_71 ! Je n’arrive pas à reproduire le bug.

Je vais te demander une petite manipulation pour avoir plus d’informations.

Est-ce que tu peux m’envoyer le JSON renvoyée par l’API pour cet affichage qui pose problème ?

Il te suffit d’ouvrir l’inspecteur quand tu es sur le tableau de bord (clic droit → inspecter l’élément), puis tu rafraichis la page et tu te mets sur l’onglet « network »:

Puis tu ouvres cette requête et affiche la response:

Je veux le contenu JSON de la réponse :slight_smile:

Dès que je peux je te donne le contenu JSON car cela se produit à l’ouverture de la page (et pas à chaque fois) et lors d’un rafraichissement les valeurs sont corrigées et le graphique s’affiche correctement!
Pas simple à reproduire!

1 Like

Bon ca été plus rapide que prévu

image

Voila la réponse JSON mais dedans les valeurs semblent correct

[{"device":{"name":"Thermomètre buanderie"},"deviceFeature":{"name":"Température buanderie"},"values":[{"created_at":"2022-10-09T10:55:00.000Z","value":19.98},{"created_at":"2022-10-09T11:15:00.000Z","value":20},{"created_at":"2022-10-09T11:40:00.000Z","value":20.09},{"created_at":"2022-10-09T11:45:00.000Z","value":20.12},{"created_at":"2022-10-09T11:55:00.000Z","value":20.08},{"created_at":"2022-10-09T12:20:00.000Z","value":20.07},{"created_at":"2022-10-09T12:35:00.000Z","value":20},{"created_at":"2022-10-09T12:40:00.000Z","value":20},{"created_at":"2022-10-09T13:05:00.000Z","value":19.95},{"created_at":"2022-10-09T13:30:00.000Z","value":19.95},{"created_at":"2022-10-09T14:00:00.000Z","value":19.97},{"created_at":"2022-10-09T14:25:00.000Z","value":19.98},{"created_at":"2022-10-09T14:35:00.000Z","value":20.07},{"created_at":"2022-10-09T14:55:00.000Z","value":20.04},{"created_at":"2022-10-09T15:25:00.000Z","value":20.08},{"created_at":"2022-10-09T16:20:00.000Z","value":19.91},{"created_at":"2022-10-09T16:55:00.000Z","value":19.56},{"created_at":"2022-10-09T17:20:00.000Z","value":19.47},{"created_at":"2022-10-09T18:00:00.000Z","value":19.77},{"created_at":"2022-10-09T18:20:00.000Z","value":20.11},{"created_at":"2022-10-09T18:45:00.000Z","value":20.28},{"created_at":"2022-10-09T19:20:00.000Z","value":20.45},{"created_at":"2022-10-09T20:20:00.000Z","value":20.53},{"created_at":"2022-10-09T21:15:00.000Z","value":20.39},{"created_at":"2022-10-09T22:10:00.000Z","value":20.46},{"created_at":"2022-10-09T23:10:00.000Z","value":20.38},{"created_at":"2022-10-09T23:20:00.000Z","value":20.36},{"created_at":"2022-10-10T00:05:00.000Z","value":20.35},{"created_at":"2022-10-10T01:55:00.000Z","value":20.26},{"created_at":"2022-10-10T02:55:00.000Z","value":20.31},{"created_at":"2022-10-10T03:50:00.000Z","value":20.22},{"created_at":"2022-10-10T04:40:00.000Z","value":20.21},{"created_at":"2022-10-10T04:50:00.000Z","value":20.16},{"created_at":"2022-10-10T05:20:00.000Z","value":20.11},{"created_at":"2022-10-10T05:50:00.000Z","value":20.19},{"created_at":"2022-10-10T06:35:00.000Z","value":20.14},{"created_at":"2022-10-10T06:40:00.000Z","value":20.11},{"created_at":"2022-10-10T07:05:00.000Z","value":20.15},{"created_at":"2022-10-10T07:25:00.000Z","value":20.16},{"created_at":"2022-10-10T07:35:00.000Z","value":20.04},{"created_at":"2022-10-10T07:55:00.000Z","value":19.89},{"created_at":"2022-10-10T08:35:00.000Z","value":19.89},{"created_at":"2022-10-10T08:50:00.000Z","value":19.77},{"created_at":"2022-10-10T09:30:00.000Z","value":19.53},{"created_at":"2022-10-10T09:35:00.000Z","value":19.48}]},{"device":{"name":"Thermomètre garage"},"deviceFeature":{"name":"Température Garage"},"values":[{"created_at":"2022-10-09T10:50:00.000Z","value":18.29},{"created_at":"2022-10-09T10:55:00.000Z","value":18.27},{"created_at":"2022-10-09T11:00:00.000Z","value":18.27},{"created_at":"2022-10-09T11:10:00.000Z","value":18.27},{"created_at":"2022-10-09T11:25:00.000Z","value":18.36},{"created_at":"2022-10-09T11:55:00.000Z","value":18.42},{"created_at":"2022-10-09T12:10:00.000Z","value":18.42},{"created_at":"2022-10-09T12:25:00.000Z","value":18.45},{"created_at":"2022-10-09T12:30:00.000Z","value":18.45},{"created_at":"2022-10-09T12:55:00.000Z","value":18.44},{"created_at":"2022-10-09T13:05:00.000Z","value":18.44},{"created_at":"2022-10-09T13:25:00.000Z","value":18.51},{"created_at":"2022-10-09T13:30:00.000Z","value":18.51},{"created_at":"2022-10-09T13:50:00.000Z","value":18.51},{"created_at":"2022-10-09T13:55:00.000Z","value":18.55},{"created_at":"2022-10-09T14:10:00.000Z","value":18.55},{"created_at":"2022-10-09T14:25:00.000Z","value":18.6},{"created_at":"2022-10-09T14:35:00.000Z","value":18.6},{"created_at":"2022-10-09T14:55:00.000Z","value":18.62},{"created_at":"2022-10-09T15:25:00.000Z","value":18.62},{"created_at":"2022-10-09T15:35:00.000Z","value":18.62},{"created_at":"2022-10-09T15:55:00.000Z","value":18.47},{"created_at":"2022-10-09T16:25:00.000Z","value":18.26},{"created_at":"2022-10-09T16:35:00.000Z","value":18.26},{"created_at":"2022-10-09T16:40:00.000Z","value":18.04},{"created_at":"2022-10-09T17:10:00.000Z","value":17.89},{"created_at":"2022-10-09T17:25:00.000Z","value":17.89},{"created_at":"2022-10-09T17:40:00.000Z","value":17.94},{"created_at":"2022-10-09T17:50:00.000Z","value":18.16},{"created_at":"2022-10-09T18:00:00.000Z","value":18.37},{"created_at":"2022-10-09T18:25:00.000Z","value":18.37},{"created_at":"2022-10-09T18:30:00.000Z","value":18.55},{"created_at":"2022-10-09T18:50:00.000Z","value":18.55},{"created_at":"2022-10-09T19:00:00.000Z","value":18.63},{"created_at":"2022-10-09T19:25:00.000Z","value":18.63},{"created_at":"2022-10-09T19:30:00.000Z","value":18.67},{"created_at":"2022-10-09T20:00:00.000Z","value":18.7},{"created_at":"2022-10-09T20:25:00.000Z","value":18.7},{"created_at":"2022-10-09T20:30:00.000Z","value":18.66},{"created_at":"2022-10-09T21:00:00.000Z","value":18.66},{"created_at":"2022-10-09T21:30:00.000Z","value":18.64},{"created_at":"2022-10-09T22:00:00.000Z","value":18.6},{"created_at":"2022-10-09T22:05:00.000Z","value":18.6},{"created_at":"2022-10-09T22:30:00.000Z","value":18.58},{"created_at":"2022-10-09T22:55:00.000Z","value":18.58},{"created_at":"2022-10-09T23:00:00.000Z","value":18.55},{"created_at":"2022-10-09T23:30:00.000Z","value":18.54},{"created_at":"2022-10-09T23:55:00.000Z","value":18.54},{"created_at":"2022-10-10T00:00:00.000Z","value":18.52},{"created_at":"2022-10-10T00:30:00.000Z","value":18.51},{"created_at":"2022-10-10T00:35:00.000Z","value":18.51},{"created_at":"2022-10-10T00:55:00.000Z","value":18.51},{"created_at":"2022-10-10T01:30:00.000Z","value":18.48},{"created_at":"2022-10-10T01:55:00.000Z","value":18.48},{"created_at":"2022-10-10T02:00:00.000Z","value":18.45},{"created_at":"2022-10-10T02:30:00.000Z","value":18.42},{"created_at":"2022-10-10T02:55:00.000Z","value":18.42},{"created_at":"2022-10-10T03:00:00.000Z","value":18.41},{"created_at":"2022-10-10T03:30:00.000Z","value":18.39},{"created_at":"2022-10-10T03:55:00.000Z","value":18.39},{"created_at":"2022-10-10T04:00:00.000Z","value":18.36},{"created_at":"2022-10-10T04:30:00.000Z","value":18.33},{"created_at":"2022-10-10T04:55:00.000Z","value":18.33},{"created_at":"2022-10-10T05:00:00.000Z","value":18.33},{"created_at":"2022-10-10T05:30:00.000Z","value":18.3},{"created_at":"2022-10-10T05:55:00.000Z","value":18.3},{"created_at":"2022-10-10T06:00:00.000Z","value":18.29},{"created_at":"2022-10-10T06:20:00.000Z","value":18.29},{"created_at":"2022-10-10T06:30:00.000Z","value":18.27},{"created_at":"2022-10-10T06:35:00.000Z","value":18.27},{"created_at":"2022-10-10T06:40:00.000Z","value":18.06},{"created_at":"2022-10-10T06:45:00.000Z","value":18.06},{"created_at":"2022-10-10T07:10:00.000Z","value":18.16},{"created_at":"2022-10-10T07:25:00.000Z","value":18.06},{"created_at":"2022-10-10T07:30:00.000Z","value":17.73},{"created_at":"2022-10-10T08:00:00.000Z","value":17.59},{"created_at":"2022-10-10T08:20:00.000Z","value":17.59},{"created_at":"2022-10-10T08:30:00.000Z","value":17.73},{"created_at":"2022-10-10T09:00:00.000Z","value":17.89},{"created_at":"2022-10-10T09:20:00.000Z","value":17.89},{"created_at":"2022-10-10T09:30:00.000Z","value":17.95}]}]

En survolant le graphique on peut voir que les valeurs de température sont bien correct. Sur l’image ci dessous je place la souris entre 18H et 23H et je peux lire 18°C, la où l’affichage montre 39°C
image

@_Will_71 J’ai importé tes données localement, et je n’arrive pas à reproduire:

C’est quoi exactement l’opération que tu fais ?

Tu ouvres la page (venant de nul part?), et directement c’est faux?

Oui c’est çà, j’ouvre uniquement la page depuis n’importe où et l’affichage est faux. Mais cela ne se produit pas à chaque fois!

Vraiment bizarre ! ça sent la race-condition, soit dans notre code, soit dans le code de la librairie qu’on utilise. ( Pour info on utilise ApexCharts en version v3.29.0, leur changelog est là: Releases · apexcharts/apexcharts.js · GitHub )

A la limite je peux essayer de faire une PR qui met à jour ApexChart.

Vu que tu as Gladys Plus maintenant (merci de ton soutien!!), si tu veux je peux faire un build spécial en ligne pour comparer les 2 versions

Oui pas de souci on peut faire un test de cette manière.

Ce que je te propose: déjà apprivoise toi avec Gladys Plus, et vois si tu as aussi le soucis avec Gladys Plus (c’est possible que non, si c’est une race condition, le fait que tu ai un peu plus de roundtrip réseau peut faire que le bug ne soit pas visible)

Si tu as le bug sur Gladys Plus aussi, je ferais un build custom, je te partagerais l’URL et tu testeras pour me dire si mettre à jour ApexChart corrige le souci.

J’ai déjà fais une PR de mon côté:

1 Like

Ok ca marche je te tiens au courant

Même problème sur Gladys plus

Je t’ai refait une image car finalement le défaut reviens très souvent maintenant que je fais attention!

image

Sur cette image on vient bien que c’est pas un problème de donnée mais d’affichage.

C’est limite une bonne chose, ça va permettre de tester le fix :smiley:

J’ai fais un build Gladys Plus à l’adresse suivante avec la librairie de charts ApexCharts mise à jour:

https://gladys-plus-update-apexcharts.netlify.app/

Tu peux te connecter avec tes identifiants Gladys Plus, et me dire si ça résout ou non le souci :slight_smile: