Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Missing Text Elements (e.g. Title, and Legends) when exporting as HTML

Aperta
#680 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

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

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:

  1. Run the provided script.
  2. Open Served app (text elements will be present).
  3. Export as HTML.
  4. 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():

Image

Exported HTML:

Image

** 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Kitware/trame

Tutte le issue di Kitware/trame

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.