Affichage des graphiques pour les capteurs binaires

For me there are necessarily two points in time: the « historical » point and the current time

Since we’re talking about a state, you have to draw the last bar between the last point and now, right?

I made the change accordingly.

I added (only for binaries) :



![image|690x332](upload://gadtuM92OPza0

Hi @pierre-gilles,

As noted above, I made the changes as you envisioned on your end.
You can review. As a reminder, the PR: https://github.com/GladysAssistant/Gladys/pull/2094

Hello @Terdious :slight_smile:

I left you a functional review on the subject:

No technical review yet until it’s functionally correct!

1 Like

Hey @pierre-gilles,

I have applied and checked the remarks except:
Could you tell me more about this part:

I tried to reproduce it but, despite zooming in/out, changing resolution, etc., I never managed to get your result. However, before my previous change I had the same issue, but I fixed it before your review. So I still reduced it to only 10 characters max just in case… ^^

And for the power plug, I replied to you on GitHub, but I can’t reproduce it. I added a log on the units to see more.

Thanks for the fixes !

Ok, I can’t reproduce it either !

I’ve left you a comment for the rest :

1 Like

Hello @pierre-gilles,

For your last comment on this PR, does this work for you:

Yes, that’s perfect :slight_smile:

1 Like

It seems to me that was the last point to address.
I think you can review it!

1 Like

Really cool :slight_smile:

I gave you 2 pieces of feedback.

I think we can then do a Cloudflare Pages build so Gladys Plus users can test with their instance, since it’s only the frontend it should work (if users properly delete their « binary » graph after the test)

1 Like

Ok good for me (I replied to you there as well)

However, for WebSockets, no issues on my side, I stayed on the page for 2 minutes and I did get updates every 22s/30s without refreshing the page … However indeed on the popup it doesn’t update automatically, you have to move the mouse.

Oh yes that would be great indeed!!^^

Thanks for the quick change! I replied to you over there, it’s fine with me for both.

I made a PR for Cloudflare Pages builds only (keep your PR):

The URL should be ready in a few minutes

1 Like

Great!!

@guim31, if you’re reading this… ^^

It’s available here:

https://terdious-add-binary-chart.gladys-plus.pages.dev

I recommend testing on a separate dashboard and deleting the dashboard after the test (to avoid polluting production).

Here’s what it looks like on my end:

I would have liked to be able to rename my feature (like in Room Device) because right now it’s way too long ^^

Otherwise it’s all good on my side!! :wink:

2 Likes

Thanks for the test Guim31 !!

In the end, it doesn’t surprise me.
I must be missing something once again. It would be crazy if we couldn’t better adjust the axis titles. I’ve spent hours on the docs and on StackOverflow… there’s no way « I » can find a way that’s not hacky…

@Terdious I don’t know if you’ve played with the yaxis options?

Typically you can specify a minWidth

That will take up space on the chart though, no secret — this kind of chart would benefit a lot from the ability to have 2 or 1 columns ^^

Otherwise, you need to give the user the ability to rename the device like for the « Devices » widget

Yes, and that was exactly it, it reduced the chart so much that I gave up. But indeed a mix of that and renaming can handle the abusive cases.
And as you say, no secret, choosing the number of columns is very beneficial (tested on a merge of the two PRs. But even at 2 columns it was still very average …

So I’ll go with that then? ‹ minWidth › + ability to rename (the edit box is going to be huge :see_no_evil:)

1 Like

[quote=« Terdious, post:78, topic:6599 »]
So shall I go with that

2 Likes

I’ve found a first compromise I think is interesting with ‹ minWidth › and a few changes. I fully loaded one of the boxes to really test.

I’ve just pushed, @pierre-gilles does Cloudflare restart automatically or is that a manual action on your part?

I’m continuing with the renaming option now, so if that’s an action on your part, it

1 Like