import React from 'react'; import { Loader, NoContent } from 'UI'; import { widgetHOC, Styles, AvgLabel } from '../common'; import { ComposedChart, Bar, BarChart, CartesianGrid, ResponsiveContainer, XAxis, YAxis, ReferenceLine, Tooltip } from 'recharts'; import { LAST_24_HOURS, LAST_30_MINUTES, YESTERDAY, LAST_7_DAYS } from 'Types/app/period'; const customParams = rangeName => { const params = { density: 40 } if (rangeName === LAST_24_HOURS) params.density = 40 if (rangeName === LAST_30_MINUTES) params.density = 40 if (rangeName === YESTERDAY) params.density = 40 if (rangeName === LAST_7_DAYS) params.density = 40 return params } const PercentileLine = props => { const { viewBox: { x, y }, xoffset, yheight, height, label } = props; return ( {label} ); }; @widgetHOC('pagesResponseTimeDistribution', { customParams }) export default class ResponseTimeDistribution extends React.PureComponent { render() { const { data, loading, compare = false, showSync = false } = this.props; const colors = compare ? Styles.compareColors : Styles.colors; return (
'Page Response Time: ' + val} /> { data.percentiles.map((item, i) => ( } allowDecimals={false} x={item.responseTime} strokeWidth={0} strokeOpacity={1} /> ))}
); } }