Chart resources are injected after chart initialization
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, nodejs
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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) => {
- Ngôn ngữ chính
- JavaScript
- Star
- 368
- Fork
- 266
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của highcharts/node-export-server
-
Update Puppeteer to version 25.11.0+ to allow ARM64 linux images to run node-export-serverCó thể đã có người làm @daniatic đã nhận 13 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
highcharts/node-export-server#686 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
highcharts/node-export-server#680 · 1 bình luận ·
-
How to get a response statusĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
highcharts/node-export-server#679 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
highcharts/node-export-server#678 ·
-
Not working on s390xĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
highcharts/node-export-server#676 ·
Tất cả issue của highcharts/node-export-server
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
HarperFast/harper#3275 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug release:v5.34
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Jason-Vaughan/TangleClaw#2504 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug status: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
mastra-ai/mastra#27538 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
Foundryborne/daggerheart#2497 ·
Maintainer thường phản hồi trong vòng 1 ngày