1.0.2 • Published 3 years ago

quickchart-scrape v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

npm.io


instal library

npm i quickchart-scrape

const lib = require('quickchart-scrape');

async function test(data) {
    return await lib.quickchart(data)
}

var type = [
    "line",
    "bar",
    "radar",
    "horizontalbar",
    "pie",
    "doughnut",
    "polararea",
    "scatter"
]
var data = {
    "type": type[Math.floor(Math.random() * type.length)],
    "title": "website",
    "array": [
        {
            "data": "google",
            "count": 30
        },
        {
            "data": "facebook",
            "count": 60
        },
        {
            "data": "yaho",
            "count": 12
        }
    ]
}
test(data).then(result => console.log(result))

result

{
  "status": true,
  "creator": '@insaneupdate',
  "photo": 'https://quickchart.io/chart/render/zm-1fc09ba5-0ad9-4fe5-850a-4058b9bff87d?title=website&labels=google,facebook,yaho&data1=30,60,12',
  "message": 'Hasilwebsite\ngoogle facebook yaho\n30, 60, 12'
}

npm.io