Sha256: 3ccee63b7604e3fc37d0e0a3b5554b6977ede09a7919e0cb2f340249d4fad21a
Contents?: true
Size: 1009 Bytes
Versions: 21
Compression:
Stored size: 1009 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, type?: 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
21 entries across 21 versions & 1 rubygems