Chart resources are injected after chart initialization
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 66/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, nodejs
- Ambito
- backend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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) => {
- Lingua principale
- JavaScript
- Stelle
- 368
- Fork
- 266
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna 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 highcharts/node-export-server
-
Update Puppeteer to version 25.11.0+ to allow ARM64 linux images to run node-export-serverForse già presa @daniatic l’ha presa 11 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
highcharts/node-export-server#686 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
highcharts/node-export-server#680 · 1 commento ·
-
How to get a response statusAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
highcharts/node-export-server#679 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
highcharts/node-export-server#678 ·
-
Not working on s390xAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
highcharts/node-export-server#676 ·
Tutte le issue di highcharts/node-export-server
Issue simili
-
data
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
gaseous-project/hasheous#637 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
gramps-project/gramps-web#1549 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
change request evaluating
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
sindresorhus/eslint-plugin-unicorn#3907 ·
I maintainer di solito rispondono entro 1 giorno
-
Priority: Low Production Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
GrottoCenter/grottocenter-api#1903 ·
I maintainer di solito rispondono entro 1 giorno