Closed kaijk closed 2 weeks ago
Drilling down into the Insepctor, I see this for the card:
<div class="card-content">
<canvas id="windRose" width="13861" height="186">
</canvas>
</div>
Width just keeps growing, by itself
I find that specifying width:
and height:
using card_mod
stops the behavior. It appears that the card does not play well when the grid is defined using fr
notation (see grid-template-columns:
at the beginning above).
The challenge and why I'm using fr
notation is that I'm deploying this on devices having differed screen widths. Fixing this card at 400px wide won't work. I like the card and would appreciate any insights.
card_mod:
style: |
ha-card {
width: 400px;
heigth: 400px;
}
Same here... Used Cardmod for now, but it messes uptime alignment of the rose in the border of the card.
I'm trying to find the time to rewrite the render code to use vector graphics. Hopefully this will fix the problems described here.
just installed this card and am having the same problem. Looking forward to the fix 👍 ...for now it is not useable.
I made my own windrose card using Plotly. https://github.com/dbuezas/lovelace-plotly-graph-card/discussions/369
On Sat, Aug 31, 2024 at 12:19 AM RedNo7 @.***> wrote:
just installed this card and am having the same problem. Looking forward to the fix 👍 ...for now it is not useable.
— Reply to this email directly, view it on GitHub https://github.com/aukedejong/lovelace-windrose-card/issues/50#issuecomment-2322810283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2THYVD3YUJKB3FFTMTMADZUFVBHAVCNFSM6AAAAABASKOYIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRSHAYTAMRYGM . You are receiving this because you authored the thread.Message ID: @.***>
Hi - thanks for looking into this - just installed v 1.6.0 but it still slowly increases in size.
Are you sure the new version is loaded? Mo browser cache issues?
Before the card rerendered after a size change. I assumed it had to do with that piece of code. This is now removed, because the browser scales the vector graphics.
I have no idea how to fix this.
crap - my bad - yes, it was cache and is now working perfectly! 👍
...I restarted HA thinking that was enough (but was running it in the app (not the browser which I would have cleared). Sorry for the confusion there.
I'm using this card within the
custom:layout-card
to create a weather page using a grid layout like this:When I include the windrose card the view starts dynamically growing. The windrose card expands compressing the fields to the right as if ignoring the
fr
s.I've tried both with and without the
max_width
parameter and replacing the windy iframe with a markdown card. (Windy grows as well, but not until the windrose is included.) This all worked fine until I included the windrose. Note, the black areas in the screenshot are other graphs that don't render after including the windrose.Of course, this may not be an issue with this card, but it happens when adding the card to an existing layout. This is immediately after a View Refresh: Then, a few seconds after the View Refresh: Windrose grows only to the right (with the max_width set) which drags the iframe down and right proportionally. This is the happy and stable view without including the windrose card into the lower left corner.
Here is the complete windrose card definition.