import React from 'react'; import { NoContent, Icon } from 'UI'; import { AreaChart, Area, CartesianGrid, Tooltip, ResponsiveContainer, XAxis, YAxis, } from 'recharts'; import { Styles } from '../../common'; import { useTranslation } from 'react-i18next'; interface Props { data: any; metric?: any; } function CPULoad(props: Props) { const { data, metric } = props; const gradientDef = Styles.gradientDef(); const { t } = useTranslation(); return ( {t('No data available for the selected period.')} } show={metric.data.chart && metric.data.chart.length === 0} style={{ height: '240px' }} > {gradientDef} Styles.tickFormatter(val)} label={{ ...Styles.axisLabelLeft, value: 'CPU Load (%)' }} /> ); } export default CPULoad;