Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Chart resources are injected after chart initialization

Abierto
#690 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, nodejs
Área
backend

Línea de trabajo

The bug is in lib/export.js: addPageResources runs after the config branch that performs the straight inject, so the styledMode CSS check fires before resources load. Read the JSON config handling block and the injectedResources bookkeeping, then move the addPageResources call ahead of the strInj branch as the reporter's patch does. Done when an export with styledMode=true and highcharts >=12.5.0 no longer logs the "Missing highcharts.css file" warning and injectedResources is still cleared between exports.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

When using styledMode=true with the export server running highcharts >=12.5.0 all charts are returned with the "Missing highcharts.css file" warning, irrespective of whether it is actually missing.

After looking through some code, it seems that resources that are passed in the export request are loaded after chart initialization, which is when the warning is encountered. I am currently using the following patch to work around this issue.

--- node_modules/highcharts-export-server/lib/export.orig.js	2026-10-14 13:43:39.623022536 -0400
+++ node_modules/highcharts-export-server/lib/export.js	2026-10-14 13:39:49.803019386 -0400
@@ -202,6 +202,11 @@
       // JSON config handling
       log(4, '[export] Treating as config.');
 
+      // Keeps track of all resources added on the page with addXXXTag. etc
+      // It's VITAL that all added resources ends up here so we can clear things
+      // out when doing a new export in the same page!
+      injectedResources = await addPageResources(page, options);
+
       // Need to perform straight inject
       if (exportOptions.strInj) {
         // Injection based configuration export
@@ -225,11 +230,6 @@
       }
     }
 
-    // Keeps track of all resources added on the page with addXXXTag. etc
-    // It's VITAL that all added resources ends up here so we can clear things
-    // out when doing a new export in the same page!
-    injectedResources = await addPageResources(page, options);
-
     // Get the real chart size and set the zoom accordingly
     const size = isSVG
       ? await page.evaluate((scale) => {
Lenguaje dominante
JavaScript
Estrellas
368
Forks
266
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de highcharts/node-export-server

Todos los issues de highcharts/node-export-server

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.