Sha256: 46b30a0628e819bb965050c4cc1e4ed7a64ca427e59a1397d9d633f88bf22fb8
Contents?: true
Size: 1.3 KB
Versions: 2
Compression:
Stored size: 1.3 KB
Contents
/* @flow */ import React from 'react' import { pbChart } from '../' type BarGraphProps = { axisTitle: String, xAxisCategories: Array, yAxisMin: Number, yAxisMax: Number, chartData: Array<{ name: String, data: Array<Number>, }>, className?: String, id: Number, pointStart: Number, subTitle?: String, title: String, type?: String, legend?: Boolean, height?: String, } export default class BarGraph extends React.Component<BarGraphProps> { static defaultProps = { className: 'pb_bar_graph', type: 'column', } componentDidMount() { const { axisTitle, xAxisCategories, yAxisMin, yAxisMax, className, chartData, id, pointStart, subTitle, title, type, legend, height, } = this.props new pbChart(`.${className}`, { axisTitle: axisTitle, chartData: chartData, id: id, pointStart: pointStart, subtitle: subTitle, type, title: title, xAxisCategories: xAxisCategories, yAxisMin: yAxisMin, yAxisMax: yAxisMax, legend: legend, height: height, }) } props: BarGraphProps render() { const { className, id } = this.props return ( <div className={className} id={id} /> ) } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
playbook_ui-4.17.0.pre.alpha1 | app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx |
playbook_ui-4.16.0 | app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx |