Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Chart resources are injected after chart initialization

オープン
#690 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
66/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, nodejs
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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) => {
主要言語
JavaScript
スター
368
フォーク
266
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

highcharts/node-export-server のほかの issue

highcharts/node-export-server の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。