
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
export-svg-chart
Advanced tools
Converts SVG+CSS charts built with front-end technologies like D3 into SVG/PNG Node buffers for server-side use.
Converts SVG+CSS charts built with front-end technologies like D3 into SVG/PNG Node buffers for server-side use.
npm install export-svg-chart --save
To get SVG and PNG exports of your chart, you need to point the library towards a page that takes care of rendering it. This can be a dynamic rendering with UI elements, or an "export/print"-specific page with another skin for the chart.
const fs = require('fs');
const exportSvgChart = require('export-svg-chart');
const options = {
url: 'http://bl.ocks.org/mbostock/raw/7341714/',
selector: '.chart',
};
exportSvgChart(options, (err, buffers) => {
if (err) return console.log(err);
fs.writeFile('basic-example.svg', buffers.svg);
fs.writeFile('basic-example.png', buffers.pngs);
});
http://bl.ocks.org/mbostock/raw/7341714/ becomes:
Under the hood, this is using Electron which uses Chromium's rendering engine. The export is generated with saveSvgAsPng.
FAQs
Converts SVG+CSS charts built with front-end technologies like D3 into SVG/PNG Node buffers for server-side use.
The npm package export-svg-chart receives a total of 1 weekly downloads. As such, export-svg-chart popularity was classified as not popular.
We found that export-svg-chart 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
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.