0.0.1 • Published 4 years ago
bar-chart-component v0.0.1
Bar Chart Component
This is a bar chart component that plots bar chart and can be used in any framework, be it Angular, React, Vue, etc
It accepts following properties:
Property | Description | Data Type | Default Value |
---|---|---|---|
chartId | unique id for the chart that is not preseent in the document for any other elements | string | chart |
chartWidth | width of the chart | string | 400px |
chartHeight | height of the chart | string | 400px |
labels | the labels of each of the bars | string[] | 'Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange' |
chartData | the data points each of the bars | number[] | 12, 19, 3, 5, 2, 3 |
chartLabel | the label for the Y-axis | string | # of Votes |
backgroundColors | background color or fill color of each of the bars | string[] | 'rgba(255, 99, 132, 0.2)','rgba(54, 162, 235, 0.2)','rgba(255, 206, 86, 0.2)','rgba(75, 192, 192, 0.2)','rgba(153, 102, 255, 0.2)','rgba(255, 159, 64, 0.2)' |
borderColors | border color of each of the bars | string[] | 'rgba(255, 99, 132, 1)','rgba(54, 162, 235, 1)','rgba(255, 206, 86, 1)','rgba(75, 192, 192, 1)','rgba(153, 102, 255, 1)','rgba(255, 159, 64, 1)' |
0.0.1
4 years ago