0.1.2 • Published 3 years ago
bianco-chart-generator v0.1.2
chart-generator
Node version v14.15.1
yarn install
yarn start
http://localhost:3000 to view it in the browser.
Generate your own charts sending:
- a data array of objects specifying
name
quantity
(array of numbers per period) andcolor
:
i.e
[{
color: "red",
name: "HTML",
quantity: 123, 145, 320, 350, 352, 354,
},
{
color: "orange",
name: "Javascript",
quantity: 290, 410, 240, 255, 120, 300,
},
{
color: "black",
name: "Next",
quantity: 120, 130, 155, 110, 140, 150,
},
{
color: "lightblue",
name: "React",
quantity: 57, 75, 83, 110, 10, 99,
}]
- a config object specifying
periodName
,periods
,showName
,sortBy
,type
,unit
:
i.e
{
periodName: "Period", //string
periods: 6, // number
showName: true, // boolean - true by default
sortBy: "none", // string - none, quantityDesc, quantityAsc, alphaDesc, alphaAsc
type: "bars", // string - rectangle, bars, line
unit: "units", // string
}