annotations not working with node export server
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- backend
Research direction
Start by running the supplied module script and inspect lib/index.js, especially mapToNewConfig, setOptions, initExport, and startExport. Compare the generated image with the supplied chart options and trace how annotations are handled during export. Done means the exported image includes both annotations.
Written by the indexing model from the issue text.
Description
"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();
- Dominant language
- JavaScript
- Stars
- 368
- Forks
- 265
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from highcharts/node-export-server
-
Update Puppeteer to version 25.11.0+ to allow ARM64 linux images to run node-export-serverPossibly taken @daniatic claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
highcharts/node-export-server#686 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
highcharts/node-export-server#680 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
highcharts/node-export-server#679 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
highcharts/node-export-server#678 ·
-
Not working on s390xOpen
Difficulty 4/5 3-5 days Newbie friendliness 30/100
highcharts/node-export-server#676 ·
All issues in highcharts/node-export-server
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Deepak3699/Ai_Mentor#244 ·
Maintainers usually reply within 1 day
-
ci-install-db-tools stall-case tests flake: stalled apt-get can be killed before it logs its callOpeneffort:low model:light plan planner:opus-5-5 tests
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mozilla-mobile/firefox-ios#35986 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
component:sight
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agentic-os-org/ANOLISA#6738 · 2 comments ·
Maintainers usually reply within 1 day