0.2.2 • Published 3 years ago

belle-chart v0.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Belle Chart

A standard normal curve chart for React

Standard Normal Curve Chart

Usage

import BelleChart from 'belle-chart'

function Main(props) {
  return <BelleChart data={props.data} />
}

Props

type DataItem = {
  value: number
  label?: string
}

// Data Prop Should match Chart.js dataset settings (as of Chart.js version ~2.8)
// The Data Array is the only exception
// https://www.chartjs.org/docs/master/general/data-structures.html
type Dataset = {
  data: Array<DataItem>
}

// Optional props

// Chart.js chart options (as of Chart.js version ~2.8)
// https://www.chartjs.org/docs/latest/general/options.html
type Options = ChartOptions

// Do we want to scatter the points along the y axis?
type xScatter = boolean