{!startDate && !endDate && (
)}
{loading == true && (
)}
{chartRows.length > 0 && (
{modelStats.map((statDef, index) => {
const category = statDef.label || statDef.name
return (
)
})}
)}
{loading == false && chartRows.length == 0 && (
)}
)
}
HistoryDisplay.propTypes = {
objectType: PropTypes.string.isRequired,
startDate: PropTypes.oneOfType([
PropTypes.string,
PropTypes.instanceOf(Date)
]),
styles: PropTypes.object,
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
}
export default HistoryDisplay