Registry / analytics / ag-charts-server-side

ag-charts-server-side

JSON →
library13.3.1jsnpmunverified

AG Charts Server-side is a server-side charting library for Node.js (>=20.0.0) that renders charts to PNG or JPEG on the server using a headless canvas. Version 13.3.1 is stable with regular releases. It supports all AG Charts features (bar, line, pie, scatter, etc.) without browser dependencies, enabling chart generation for reports, emails, or APIs. Key differentiators: no Puppeteer/headless Chrome needed, faster rendering, and first-class TypeScript types.

npm install ag-charts-server-side
INSTALL
IMPORT
SIG · AG-CHARTS-SERVER-S
A
ag-charts-server-side
analyticsjavascriptv13.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AgCharts
import { AgCharts } from 'ag-charts-community'
const AgCharts = require('ag-charts-server-side')
AgCharts is imported from ag-charts-community; ag-charts-server-side provides the rendering environment.
createServerSideChart
import { createServerSideChart } from 'ag-charts-server-side'
As of v13, function is exported from ag-charts-server-side.
AgChartInstance
import type { AgChartInstance } from 'ag-charts-community'
import { AgChartInstance } from 'ag-charts-server-side'
AgChartInstance is a type exported from ag-charts-community, not from server-side package.

Creates a server-side bar chart with sample data, renders it to PNG buffer.

import { createServerSideChart } from 'ag-charts-server-side'; import { AgCharts } from 'ag-charts-community'; async function generateChart() { const chart = await createServerSideChart({ container: null, width: 800, height: 600, data: [ { month: 'Jan', revenue: 1200 }, { month: 'Feb', revenue: 1500 }, { month: 'Mar', revenue: 1100 }, ], series: [{ type: 'bar', xKey: 'month', yKey: 'revenue' }], }); const buffer = await chart.renderToBuffer({ format: 'png' }); console.log('Chart PNG buffer:', buffer); } generateChart().catch(console.error);
Debug
Known issues
breakingPackage name changed from ag-charts-enterprise to ag-charts-server-side in v10.
fix
Update imports to 'ag-charts-server-side'.
affects: >=10.0.0
breakingcreateServerSideChart() now requires Node.js >=20.0.0.
fix
Upgrade Node.js or use older version.
affects: >=13.0.0
Errors
Common errors & fixes
Error: Could not find module 'canvas'
Missing native canvas dependency on Linux.
fix
Install 'canvas' package: npm install canvas
TypeError: chart.renderToBuffer is not a function
Using older API without renderToBuffer.
fix
Upgrade to ag-charts-server-side@13 and use chart.renderToBuffer() instead of .render().
Module not found: Can't resolve 'ag-charts-community'
Missing peer dependency ag-charts-community.
fix
Install ag-charts-community: npm install ag-charts-community
Upgrade
Version history
13.3.1latest on npm
Audit
Dependencies
ag-charts-communityrequiredCore charting library; server-side rendering depends on its API
Agent activity
50 hits · last 30 days
node
42
OpenAI (training)
2
Resources
ag-charts-server-side — npm install ag-charts-server-side · libregistry