Generate a bar chart in svg format. Intended to be used to generate an API response.
npm install @byu-oit/bar-chartjavascript
import barChart from '@byu-oit/bar-chart'const myData = [10, 12, 14, 24, 38]
const myDataLabels = ['A', 'B', 'C', 'D', 'E']
const chartSvg = barChart({data: myData, labels: myDataLabels})
`$3
The bar chart function takes a single configuration parameter.key | type | required? | description
--- | ----- | --------- | -----------
data | Array of Numbers, or 2 Dimensional Array of Numbers | required | An array of values to chart. For example, if you want to chart visits per day, your data could be
[104, 78, 120, 88] with labels of ['May 13', 'May 14', 'May 15', 'May 16']`. The values may themselves be arrays, but must all have the same length.