Render AG Charts to PNG and JPEG images in Node.js, without a browser. See the documentation for full details.
npm install
npm run basicThe rendered chart is written to output/chart.png.
| Script | Command | Description |
|---|---|---|
01-basic-render.ts |
npm run basic |
Renders a bar chart to PNG |
02-jpeg-output.ts |
npm run jpeg |
JPEG output with quality and high-DPI settings |
03-express-server.ts |
npm run server |
HTTP endpoint serving chart images at localhost:3000/chart.png |
Click the badge above to launch a ready-to-use environment. Once open:
npm run serverCodespaces auto-forwards port 3000 and provides a URL to view the chart in your browser.
- Node.js 20.0.0 or later
skia-canvasnative dependencies (included in the Codespaces image)