
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
apex-charts-node
Advanced tools
This package allows you to render Apex Charts on the server as PNG images. It's part of QuickChart, which offers a suite of tools for rendering charts & graphs as images.
Rendering takes an Apex Charts config and is made possible through the use of puppeteer, which uses the Chromium browser for "headless" rendering.
This project is available on NPM.
npm install apex-charts-node
const ApexChartsNode = require('apex-charts-node');
// Build your config as you would normally
const config = {
chart: {
type: 'line'
},
series: [{
name: 'sales',
data: [30,40,35,50,49,60,70,91,125]
}],
xaxis: {
categories: [1991,1992,1993,1994,1995,1996,1997, 1998,1999]
}
};
// Render the chart to image
const image = await ApexChartsNode.render(drawChart, {
width: 500,
height: 300,
});
This produces the following image:
The library exposes a single function, render.
chartConfig is a JSON/Javascript object that is used to define the chart. You can put any regular Apex Charts object here.
options is a dictionary containing some settings and parameters:
Note that if you specify width
only, height
will be automatically calculated according to the "golden ratio" 1.618, which translates roughly to a 16:10 aspect ratio.
FAQs
Headless image renderer for Apex Charts
The npm package apex-charts-node receives a total of 0 weekly downloads. As such, apex-charts-node popularity was classified as not popular.
We found that apex-charts-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.