0.0.1-alpha.0 • Published 5 years ago

@johnsylvain/histogram v0.0.1-alpha.0

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

<x-histogram>

Web Component for generating a simple SVG histogram

Usage

yarn add @johnsylvain/histogram
import '@johnsylvain/histogram';
<x-histogram data="[0, 1, 2, 3, 4]"></x-histogram>

Options

AttributeOptionsDefaultDescription
dataArray<number>[]List of data to display as histogram
bucketsnumber10Number of buckets to make
heightnumber100Height of the histogram
colorstring#d3d3d3Color of the histogram bars
radiusnumber0Corner radius of the buckets