openreplay/frontend/app/components/Dashboard/Widgets/SlowestResources/Chart.js
2021-05-01 15:12:01 +05:30

15 lines
440 B
JavaScript

import { AreaChart, Area } from 'recharts';
import { Styles } from '../common';
const Chart = ({ data, compare }) => {
const colors = compare ? Styles.compareColors : Styles.colors;
return (
<AreaChart width={ 90 } height={ 30 } data={ data.chart } >
<Area type="monotone" dataKey="avg" stroke={colors[0]} fill={ colors[3] } fillOpacity={ 0.5 } />
</AreaChart>
);
}
Chart.displayName = 'Chart';
export default Chart;