import { Loader, NoContent } from 'UI'; import { widgetHOC, Styles } from '../common'; import { BarChart, Bar, CartesianGrid, Legend, ResponsiveContainer, XAxis, YAxis, Tooltip } from 'recharts'; import { LAST_24_HOURS, LAST_30_MINUTES, YESTERDAY, LAST_7_DAYS } from 'Types/app/period'; const customParams = rangeName => { const params = { density: 28 } if (rangeName === LAST_24_HOURS) params.density = 21 if (rangeName === LAST_30_MINUTES) params.density = 28 if (rangeName === YESTERDAY) params.density = 28 if (rangeName === LAST_7_DAYS) params.density = 28 return params } @widgetHOC('resourcesCountByType', { customParams }) export default class BreakdownOfLoadedResources extends React.PureComponent { render() { const { data, loading, period, compare = false, showSync = false } = this.props; const colors = compare ? Styles.compareColors : Styles.colors; const params = customParams(period.rangeName) return ( ); } }