# Graphical display with incorrect data

**URL:** <https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569>\
**Category:** Configuration\
**Created:** [October 6, 2022, 2:08pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569 "2022-10-06T14:08:36Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 11, 2022, 1:11pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/21 "2022-10-11T13:11:03Z")

</div>

Ok thanks, I’ll test it and I’ll let you know.

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 11, 2022, 5:45pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/22 "2022-10-11T17:45:54Z")

</div>

@pierre-gilles, bad news because I’m still experiencing the issue

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/8/89208dc42228872ac6a42229d9526e1c6f327783.png)  
The first part of the red curve is not displayed properly

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 11, 2022, 7:48pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/23 "2022-10-11T19:48:33Z")

</div>

However, there is still a difference with this build. The cursor and the window do not open when hovering the mouse over the chart

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/f/fd0b56e5db3b8e37b4f4cf0f5f17832c1810c4d2.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:** [October 14, 2022, 3:22am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/24 "2022-10-14T03:22:05Z")

</div>

> [@\_Will\_71](#):
>
> @pierre-gilles, bad news because I’m still seeing the issue

Ok, damn! that means upgrading the library doesn’t solve the problem.

> [@\_Will\_71](#):
>
> However there is still a difference with this build. The pointer and the window don’t open on mouse hover over the chart

And worse, it breaks other features ^^

I’m not merging!

It annoys me because that means back to square one… I can’t reproduce your bug and so it’s very hard to know where it’s coming from.

If you want to investigate a bit more, one option would be to browse the issues of the library we use:

> **[apexcharts/apexcharts.js](https://github.com/apexcharts/apexcharts.js/issues)**
>
> 📊 Interactive JavaScript Charts built on SVG. Contribute to apexcharts/apexcharts.js development by creating an account on GitHub.

Another option, would you mind sending me your database? So I can see if I can reproduce the bug myself. However, it’s an operation that needs to be done via the command line…

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 14, 2022, 8:29am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/25 "2022-10-14T08:29:43Z")

</div>

> [@pierre-gilles](#):
>
> > [@\_Will\_71](#):
> >
> > But there is still a difference with this build. The pointer and the window do not open when hovering the mouse over the graph
> 
> And worse, it breaks other features ^^

However, I should note that this phenomenon occurs only where the display is incorrect.

I’ll try to look at their issues on GitHub.

No problem sending you my DB, I wrote a script that backs up my Gladys DB every day to a personal server. Before Gladys Plus, I had to do a manual backup so as not to lose everything!  
I’ll send you the latest copy by PM.

---

<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:** [October 14, 2022, 8:43am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/26 "2022-10-14T08:43:19Z")

</div>

Great, thanks 🙂 We’ll find it!!

---

<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:** [October 14, 2022, 10:55am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/27 "2022-10-14T10:55:06Z")

</div>

I got your DB, impressive setup — great to see!! 😃

However, bad news, I can’t reproduce it…

I go to your dashboard «&nbsp;Temperature and humidity&nbsp;», and I refresh like crazy dozens of times in a row; nothing helps — the «&nbsp;BASEMENT TEMPERATURE&nbsp;» display is fine

You’re not on an «&nbsp;exotic&nbsp;» browser by any chance? (we support the usual ones: Firefox, Chrome and Safari)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 14, 2022, 11:26am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/28 "2022-10-14T11:26:18Z")

</div>

Thanks for my DB, yes I’ve really migrated everything from Domoticz to Gladys, only the Enedis module that’s running on Domoticz remains! It took me a little time to get all that done.

Strangely I haven’t had the issue today yet, but beware — on refresh the display is correct; it’s only when opening the page that the problem **may** appear

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 14, 2022, 11:47am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/29 "2022-10-14T11:47:15Z")

</div>

After a few tries switching between my dashboards one of the charts isn’t right!

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

[EDIT 1] In Chrome, same result on the same graph

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/9736ca7b8eab1ceb2241e24eaae299febf4aabd7.png)

[EDIT2] In Firefox, same result and again on the same graph

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/d/deb81968051f81cd0394804bd7d6e0ff0bed9de9.png)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 14, 2022, 11:57am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/30 "2022-10-14T11:57:42Z")

</div>

I found this issue on GitHub that looks a bit like an incorrect display of data

> <https://github.com/apexcharts/apexcharts.js/issues/1801>
>
> \# Bug report
> the second serie dosnt use the scale of the first serie. if two s…eries have the same axis and max property was set.  
> 
> \## Codepen
> https://codepen.io/github-rj/pen/qBbGVMo
> 
> 
> \## Explanation
> 
> \- What is the behavior you expect?
> !\[image\](https://user-images.githubusercontent.com/21079928/88676569-84608a00-d0ec-11ea-96be-7900b93c0f20.png)
> 
> \- What is happening instead?
> !\[image\](https://user-images.githubusercontent.com/21079928/88676419-52e7be80-d0ec-11ea-8065-9aa2bc60c84a.png)
> 
> In this example, i have two series :
> 
> \- serie-1 and serie-2 have axis 0.
> 
> serie-1 has Y-Axis Properties: 
> \` {
> seriesName: "Serie1",
> max :41
> }\`
> serie-2 has Y-Axis Properties:
> \`{
> show: false,
> seriesName: "Serie1",
> }\`
> 
> I expected Series-2 to be the same scale as Series-1.

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/3/38b3416077f1b5054a6da3c88024d4f862d23c6c.png)

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [October 14, 2022, 12:05pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/31 "2022-10-14T12:05:41Z")

</div>

> [@pierre-gilles](#):
>
> I received your DB, impressive setup — it’s a pleasure to see!! 😃

When you have a chance, could you show us your setup and how you use it? 🙂

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 14, 2022, 12:36pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/32 "2022-10-14T12:36:30Z")

</div>

Occasionally, yes — if you want I could write something. But otherwise there’s nothing really special in my setup. There’s Zigbee, Z-Wave, Tasmota, Netatmo, electricity consumption monitoring, heating management. With Node-RED and a few scenes! 😃  
There are also things I reused from existing installations.

---

<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:** [October 14, 2022, 1:15pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/33 "2022-10-14T13:15:48Z")

</div>

> [@\_Will\_71](#):
>
> , but be careful with the refresh the display is correct, it’s only when opening the page that the problem **may** appear!

Ah! When you say “opening the page”, do you mean switching from one Dashboard to another?

I haven’t tested that

> [@\_Will\_71](#):
>
> Occasionally yes if you want I could write something.

And would you be interested in taking part in my YouTube interviews? 🙂

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 14, 2022, 1:43pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/34 "2022-10-14T13:43:19Z")

</div>

> [@pierre-gilles](#):
>
> Ah! When you say “opening the page”, do you mean switching from one Dashboard to another?

Yes, that’s right, by switching from one dashboard to another. Sorry, I may have expressed myself poorly.

> [@pierre-gilles](#):
>
> And would you be interested in taking part in my YouTube interviews? 🙂

A written presentation, yes, but for YouTube, sorry, not for now. Note this isn’t a firm no but for the moment I’m not very keen. Maybe later 😄  
I was sure you’d ask me that when @lmilcent made the request.

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [October 14, 2022, 1:52pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/35 "2022-10-14T13:52:53Z")

</div>

> [@\_Will\_71](#):
>
> I was sure you were going to ask me that question when @lmilcent made the request.

🤣

In the presentation section, you can always share your setup, your use cases, scenes, etc. It’s really simple, but talking about my motion sensor in the mailbox gave some people ideas! It’s nothing much, but you still have to think of it.

---

<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:** [October 14, 2022, 2:36pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/36 "2022-10-14T14:36:08Z")

</div>

> [@\_Will\_71](#):
>
> Yes, that’s it, by switching from one dashboard to another. Sorry, I may have expressed myself poorly.

Ok 🙂 I’ll get back to it on Monday, it’s nighttime here!

[quote=«&nbsp;\_Will\_71, post:34, topic:7569&nbsp;»]  
A written presentation, yes,

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [October 14, 2022, 2:51pm UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/37 "2022-10-14T14:51:35Z")

</div>

Ok, no worries and have a good weekend.

---

<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:** [October 17, 2022, 6:50am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/38 "2022-10-17T06:50:37Z")

</div>

@_Will_71 I managed to reproduce it!!

The bug occurs only in one case: when you switch from «&nbsp;Electricity&nbsp;» to «&nbsp;Temperature and humidity&nbsp;»

I think it’s an issue due to both dashboards having a «&nbsp;Chart&nbsp;» box in the same place (top right), and so Preact (the frontend library we use) uses the same component and re-renders that component with the other’s information, and there must be a logic/timing bug during that re-render that mixes the information from one and the other.

I’m investigating!

---

<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:** [October 17, 2022, 7:02am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/39 "2022-10-17T07:02:17Z")

</div>

It was easy, a classic bug!

We just needed to reproduce it locally 🙂

Thanks for your DB 🙏

The PR that fixes the bug:

> <https://github.com/GladysAssistant/Gladys/pull/1622>
>
> \### 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)
> \- \[\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[\] 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\](https://community.gladysassistant.com/) for testing before merging.
> \- \[\] 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
> 
> Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [October 17, 2022, 7:13am UTC](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569/40 "2022-10-17T07:13:24Z")

</div>

You can tell they’re experienced at debugging! Nice find 🙂

[Previous page](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569.md?page=1)

[Next page](https://community.gladysassistant.com/t/affichage-graphique-avec-des-donnees-erronees/7569.md?page=3)
