Socket
Socket
Sign inDemoInstall

@simspace/nivo-api

Package Overview
Dependencies
173
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @simspace/nivo-api

Rendering API for nivo dataviz React/d3 components


Version published
Maintainers
4
Created

Readme

Source

nivo-api

Rendering API for nivo dataviz React/d3 components.

A demo is available on heroku, but may not respond depending on usage.

How it works

The API expose some of the nivo charts by using React server side environment.

First you will have to make a post request on the desired endpoint, for example:

curl -X POST \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  -d '{ "width": 500, "height": 500, "data": [[223, 299, 345, 184], [123, 248, 65, 123], [412, 76, 187, 312], [97, 37, 502, 176]]}' \
  'http://localhost:3030/charts/chord'

{
  "id": "73633fea-160e-4118-a534-377c3ed85254",
  "url": "http://localhost:3000/r/73633fea-160e-4118-a534-377c3ed85254"
}

The response contains a link to the chart

GET http://localhost:3000/r/73633fea-160e-4118-a534-377c3ed85254

Charts endpoints

POST /charts/bar
POST /charts/bubble
POST /charts/calendar
POST /charts/chord
POST /charts/line
POST /charts/pie
POST /charts/radar
POST /charts/sankey
POST /charts/sunburst
POST /charts/treemap

Charts samples

Repositories

FAQs

Last updated on 07 Dec 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc