@johnsylvain/histogram
v0.0.1-alpha.0
Published
Web Component for generating a simple SVG histogram
Maintainers
Readme
<x-histogram>
Web Component for generating a simple SVG histogram
Usage
yarn add @johnsylvain/histogramimport '@johnsylvain/histogram';<x-histogram data="[0, 1, 2, 3, 4]"></x-histogram>Options
| Attribute | Options | Default | Description |
|-----------|-----------------|---------|--------------------------------------|
| data | Array<number> | [] | List of data to display as histogram |
| buckets | number | 10 | Number of buckets to make |
| height | number | 100 | Height of the histogram |
| color | string | #d3d3d3 | Color of the histogram bars |
| radius | number | 0 | Corner radius of the buckets |
