Sha256: 150adeb7f3e17f9c5e0c6ad3e3cb563ce4c116d7e0d144a8bcdf3eb9af2b12f6
Contents?: true
Size: 992 Bytes
Versions: 11
Compression:
Stored size: 992 Bytes
Contents
/* @flow */ import React from 'react' import { pbChart } from "../" type BarGraphProps = { axisTitle: String, chartData: Array<{ name: String, data: Array<Number>, }>, className?: String, id: Number, pointStart: Number, subTitle?: String, title: String, } export default class BarGraph extends React.Component<BarGraphProps> { static defaultProps = { className: 'pb_bar_graph', type: 'column', } componentDidMount() { const { axisTitle, className, chartData, id, pointStart, subTitle, title, type, } = this.props new pbChart(`.${className}`, { axisTitle: axisTitle, chartData: chartData, id: id, pointStart: pointStart, subtitle: subTitle, type, title: title, }) } props: BarGraphProps render() { const { className, id } = this.props return ( <div className={className} id={id} /> ) } }
Version data entries
11 entries across 11 versions & 1 rubygems