From 28c8cc6863ec6e6ff248134bcf47e5acc473ba5a Mon Sep 17 00:00:00 2001 From: ahalekelly Date: Thu, 23 Jun 2022 10:13:13 -0700 Subject: [PATCH] Fix line off the right of closed markets (#569) --- web/components/contract/contract-prob-graph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/contract/contract-prob-graph.tsx b/web/components/contract/contract-prob-graph.tsx index ed75d94a..7386d748 100644 --- a/web/components/contract/contract-prob-graph.tsx +++ b/web/components/contract/contract-prob-graph.tsx @@ -56,7 +56,7 @@ export const ContractProbGraph = memo(function ContractProbGraph(props: { const timeStep: number = latestTime.diff(startDate, 'ms') / totalPoints const points: { x: Date; y: number }[] = [] - for (let i = 0; i < times.length; i++) { + for (let i = 0; i < times.length - 1; i++) { points[points.length] = { x: times[i], y: probs[i] * 100 } const numPoints: number = Math.floor( dayjs(times[i + 1]).diff(dayjs(times[i]), 'ms') / timeStep