New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-picasso

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-picasso

Proof of concept of how to run a picasso.js instance in a Node.JS / (and hopefully) WebWorker Environment. This is not in any way an official way of rendering picasso.js charts in nodejs.

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-60%
Maintainers
1
Weekly downloads
 
Created
Source

node-picasso (proof of concept & WIP)

Proof of concept of how to run a picasso.js instance in a Node.JS / (and hopefully) WebWorker Environment. This is not in any way an official way of rendering picasso.js charts in nodejs.

How does it work

It utilizes jsdom, canvas-prebuilt, vm-shim and a small set of picasso-related hacks to get the SVG output of a picasso.js chart.

How do i use it

Check out test.js but essentially in a node-env you would do this

const picasso = require('node-picasso');

const result = picasso.chart({ 
    settings: {}, /* your settings here */ 
    data: {}, /* data here as usual */
    element: { /* element object is different */
        width: 800,
        height: 600
    }
}); 

console.log(result); // SVG output

You might want to wrap it in a try/catch aswell...

Why

'Cause I wanted to - and hopefully because it's faster than spinning up a headless browser

FAQs

Package last updated on 15 May 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc