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

annotations not working with node export server

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js
領域
backend

調査の方向性

まず、提供されたモジュールスクリプトを実行し、lib/index.js、特に mapToNewConfig、setOptions、initExport、startExport を調べてください。生成された画像を提供されたチャートオプションと比較し、エクスポート中にアノテーションがどのように処理されるかを追跡してください。エクスポートされた画像に両方のアノテーションが含まれていれば完了です。

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

説明

bug only json

"I am using the Highcharts Node Export Server, and my chart contains annotations. However, when I export the chart using the Node module or the Highcharts server arguments , the exported image does not include any annotations.

I need a solution to fix this issue, please."

Expected behaviour

Chart image with annotations

Actual behaviour

Chart image without annotations

![options_phantom]
(https://github.com/user-attachments/assets/b8f833bf-f115-4ad2-90e1-cfdf6f6ac315)

Reproduction steps

### here is js code used

import { writeFileSync } from 'fs';
import exporter from '../../lib/index.js';
// Export settings with the old options structure (PhantomJS)
// Will be mapped appropriately to the new structure with the mapToNewConfig utility
const exportSettings = {
  type: 'png',
  constr: 'chart',
  outfile: './samples/module/options_phantom.jpeg',
  logLevel: 4,
  scale: 1,
  workers: 1,
  options: {
    chart: {
      type: "column",
      backgroundColor: "#FFFFFF",
    },
    title: {
      text: "Monthly Revenue",
    },
    xAxis: {
      categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
      title: {
        text: "Months",
      },
    },
    yAxis: {
      min: 0,
      title: {
        text: "Revenue (USD)",
      },
    },
    series: [
      {
        name: "Revenue",
        data: [3000, 4000, 3200, 5000, 4500, 6000, 7000, 6800, 6200, 7500, 8200, 9000],
      },
    ],
    annotations: [
      {
        labels: [
          {
            point: {
              xAxis: 0,
              yAxis: 0,
              x: 3, // April
              y: 5000,
            },
            text: "Highest Revenue of the Quarter",
          },
          {
            point: {
              xAxis: 0,
              yAxis: 0,
              x: 11, // December
              y: 9000,
            },
            text: "Year-End Peak",
          },
        ],
      },
    ],
  }
};
const start = async () => {
  try {
    // Map to fit the new options structure
    const mappedOptions = exporter.mapToNewConfig(exportSettings);
    // Set the new options
    const options = exporter.setOptions(mappedOptions);
    // Init a pool for one export
    await exporter.initExport(options);
    // Perform an export
    await exporter.startExport(options, async (error, info) => {
      // Exit process and display error
      if (error) {
        throw error;
      }
      const { outfile, type } = info.options.export;
      // Save the base64 from a buffer to a correct image file
      writeFileSync(
        outfile,
        type !== 'svg' ? Buffer.from(info.result, 'base64') : info.result
      );
      // Kill the pool
      await exporter.killPool();
    });
  } catch (error) {
    // Log the error with stack
    exporter.logWithStack(1, error);
    // Gracefully shut down the process
    await exporter.shutdownCleanUp(1);
  }
};
start();
主要言語
JavaScript
スター
368
フォーク
265
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 を短くまとめたダイジェスト。