quickchart-js is the official JavaScript client library for QuickChart.io, a web service that renders static Chart.js images from a URL or POST request. It allows developers to programmatically generate highly customizable charts for various applications like email, SMS, or chat platforms. The library wraps the QuickChart API, simplifying the process of setting chart configurations (based on Chart.js syntax), dimensions, formats, and retrieving either long encoded URLs, short shareable URLs, or saving charts directly to a file. The current stable version is 3.1.3, with updates released periodically, typically every few months, reflecting active maintenance. A key differentiator is its ability to convert dynamic Chart.js configurations into static images, offering robust integration options where dynamic JavaScript charting is not feasible.
npm install quickchart-jsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure a Chart.js bar chart, customize its properties, retrieve both long and short URLs, and save the generated image to a local file.
Upgrade your Node.js runtime to version 14 or newer.
Update your imports and instantiations from `QuickChartClient` to `QuickChart`.
For long-term storage or high-traffic applications, consider a QuickChart.io subscription or use `getUrl()` for non-expiring direct URLs.
If your chart configuration includes JavaScript functions, ensure you pass the config as a JSON string to `setConfig()`: `myChart.setConfig(JSON.stringify({ /* config with functions */ }));`If encountering issues with advanced Chart.js features or custom plugins, consider upgrading to a QuickChart.io subscriber plan or self-hosting the QuickChart API for unrestricted access. Refer to the QuickChart documentation for specific limitations.
Change `new QuickChartClient()` to `new QuickChart()`.
Free up disk space or choose a different output location with enough available storage.
Stringify your chart configuration object if it contains JavaScript functions: `myChart.setConfig(JSON.stringify(myChartConfigObject));`
No dependency data recorded yet.