diff --git a/frontend/src/app/trends/page.tsx b/frontend/src/app/trends/page.tsx index dde3120..6b151e1 100644 --- a/frontend/src/app/trends/page.tsx +++ b/frontend/src/app/trends/page.tsx @@ -15,7 +15,7 @@ import CountUp from 'react-countup'; const Page: React.FC = () => { const [variables, setVariables] = useState({ - first: 10000, + first: 1000, }); const { loading, data, previousData, error } = useQuery(FIND_BUILD_DURATIONS, { @@ -52,7 +52,11 @@ const Page: React.FC = () => { to: x.endedAt, duration: (new Date(x.endedAt).getTime() - new Date(x.startedAt).getTime()) } - dataPoints.push(point) + // if there are empty/nil dates they get set to max epoch start time + // which throws the graph off. + if (point.duration > 0) { + dataPoints.push(point) + } }); const formatter: StatisticProps['formatter'] = (value) => ( @@ -84,14 +88,14 @@ const Page: React.FC = () => { } - titleBits={[Invocation Durations ]}> + titleBits={[Invocation Durations]}> + -