Sha256: 7619ffc998f55ac3f6eee5502748db8151ed6c56dc69576c306e7e5ae93eaf7b
Contents?: true
Size: 1.21 KB
Versions: 4
Compression:
Stored size: 1.21 KB
Contents
/* @flow */ import React from "react" import pbChart from "../plugins/pb_chart_plugin.js" type LineGraphProps = { axisTitle?: String, className?: String, chartData: Array<{ name: String, data: Array<Number>, }>, gradient?: Boolean, id: String, pointStart: Number, subTitle?: String, title: String, } export default class LineGraph extends React.Component<LineGraphProps> { static defaultProps = { className: 'pb_bar_graph', gradient: false, type: 'line', } 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: LineGraphProps render() { const { className, id } = this.props return ( <div className={className} id={id} /> ) } }
Version data entries
4 entries across 4 versions & 1 rubygems