Impossible to set layout width in %
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- angular, typescript
Rechercherichtung
Beginne am -Einstiegspunkt und reproduziere das erste Rendering innerhalb einer sidenav mit width: 100% und einer festen Höhe. Verfolge, warum das anfängliche Layout 700px verwendet, während eine Größenänderung oder das Verschieben der Achse dies korrigiert; abgeschlossen ist es, wenn die prozentuale Breite beim ersten Rendering berücksichtigt wird, ohne die displayGraph-Umgehungslösung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hello,
In my case i updated angular and figured that witdh of my <plotly-plot> is now fixed to 700px.
My graph is displayed in a sidenav, and the 700px is higher than the sidenav width.
Also this is not working in html :
<plotly-plot [style]="{ width: '100%', height: '220px' }" ...></plotly-plot>
The height is correctly set but width:100% is totaly ignored as it's not valid value in px and the default value 700px stay.
Another thing is that after a window resize or a graph axis moove all is correctly set again and graph fit to the container.
So it is just about the first render forcing to 700px;
I used a temporary trick to make the graph fit properly.
- An event is triggered when the sidenav is opened, this event sets a boolean "displayGraph" to true.
- This boolean is then used to display the graph via a *ngIf="displayGraph"
Best regards,
CUETO Vincent
- Vorherrschende Sprache
- TypeScript
- Sterne
- 242
- Forks
- 81
- Ø Merge
- 8 Std. 48 Min.
- Gemergte PRs (30 T.)
- 18
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus plotly/angular-plotly.js
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
plotly/angular-plotly.js#285 · 3 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
plotly/angular-plotly.js#283 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
plotly/angular-plotly.js#281 · 8 Kommentare · 2 Reaktionen ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
plotly/angular-plotly.js#278 · 2 Kommentare · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
plotly/angular-plotly.js#276 · 2 Kommentare ·