import React from 'react'; import PropTypes from 'prop-types'; import { VictoryChart, VictoryLine, VictoryLegend } from 'victory'; import { Col } from 'reactstrap'; const Graph = ({ graphData, title, legendData }) => ( {(title || legendData.length > 0) && ( )} {graphData.length > 0 && graphData.map((item) => ( ))} ); Graph.propTypes = { graphData: PropTypes.arrayOf( PropTypes.shape({ data: PropTypes.arrayOf(PropTypes.shape({})), color: PropTypes.string, }), ), title: PropTypes.string, legendData: PropTypes.arrayOf(PropTypes.shape({})), }; Graph.defaultProps = { graphData: null, title: '', legendData: [], }; export default Graph;