Missing Text Elements (e.g. Title, and Legends) when exporting as HTML
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- html, python
- Ambito
- data-visualization, web-dev
Direzione di ricerca
Inizia con la riproduzione Python fornita, quindi segui pyvista.Plotter.export_html e il percorso trame plotter_ui, incluso il modo in cui vtksz genera l’HTML. Confronta l’app servita con il risultato esportato e verifica che il titolo, le annotazioni testuali e le etichette della legenda siano preservati nell’HTML esportato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Title, text, and label elements are not visible when exporting to HTML, either from the server or using pyvista.Plotter.export_html. The same issue occurs with vtksz, from which as far as I understood the HTML is generated.
To Reproduce
Steps to reproduce the behavior:
- Run the provided script.
- Open Served app (text elements will be present).
- Export as HTML.
- Observe that the title, text, and legend labels are missing.
⚠️ Can also be reproduces with pyvista.Plotter.export_html.
Code
"""Script to report bug - text elements not showing on HTML exports."""
import pyvista as pv
from pyvista import examples
from pyvista.trame.ui import plotter_ui
from trame.app import get_server
from trame.ui.vuetify3 import SinglePageLayout
pv.OFF_SCREEN = True
server = get_server()
state, ctrl = server.state, server.controller
mesh = examples.load_random_hills()
pl = pv.Plotter()
pl.add_mesh(mesh, label="mesh")
pl.add_text("My Sphere Plot", position="upper_edge", font_size=24, color="black")
pl.add_legend()
with SinglePageLayout(server) as layout:
with layout.content:
view = plotter_ui(pl)
if __name__ == "__main__":
server.start()
Expected behavior
The exported HTML should include all text elements, including the title, text annotations, and legend labels.
Screenshots
Served app (or pyvista.Plotter.show():
Exported HTML:
** Environment **
--------------------------------------------------------------------------------
Date: Fri Feb 07 11:42:30 2025 CET
OS : Darwin (macOS 15.2)
CPU(s) : 8
Machine : arm64
Architecture : 64bit
RAM : 16.0 GiB
Environment : Python
File system : apfs
Python 3.10.15 (main, Dec 5 2024, 12:36:43) [Clang 16.0.0
(clang-1600.0.26.4)]
pyvista : 0.44.2
vtk : 9.3.1
numpy : 1.24.4
matplotlib : 3.9.3
scooby : 0.10.0
pooch : 1.8.2
pillow : 11.0.0
IPython : 8.30.0
scipy : 1.14.1
tqdm : 4.67.1
trame : 3.8.0
trame_client : 3.5.2
trame_server : 3.3.0
trame_vtk : 2.8.14
trame_vuetify : 2.8.1
nest_asyncio : 1.6.0
--------------------------------------------------------------------------------
Platform:
Device:
- Desktop
- Mobile
OS:
- Windows
- MacOS
- Linux
- Android
- iOS
Browsers Affected:
- Chrome
- Firefox
- Microsoft Edge
- Safari
- Opera
- Brave
- IE 11
- Lingua principale
- Python
- Stelle
- 705
- Fork
- 88
- Merge medio
- 1h 43m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Kitware/trame
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Trame maintenance tasksForse di nuovo libera @jourdain l’ha presa 195 giorni fa e non c’è nessuna pull request aperta. Aperta
Tutte le issue di Kitware/trame
Issue simili
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog checkForse già presa @ocelotl l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
open-telemetry/opentelemetry-python#5825 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cuga-project/cuga-agent#1020 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/playwright#43640 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
stac-utils/stac-fastapi-elasticsearch-opensearch#965 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno