Fix line off the right of closed markets (#569)

This commit is contained in:
ahalekelly 2022-06-23 10:13:13 -07:00 committed by GitHub
parent cdd8af241b
commit 28c8cc6863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ export const ContractProbGraph = memo(function ContractProbGraph(props: {
const timeStep: number = latestTime.diff(startDate, 'ms') / totalPoints const timeStep: number = latestTime.diff(startDate, 'ms') / totalPoints
const points: { x: Date; y: number }[] = [] 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 } points[points.length] = { x: times[i], y: probs[i] * 100 }
const numPoints: number = Math.floor( const numPoints: number = Math.floor(
dayjs(times[i + 1]).diff(dayjs(times[i]), 'ms') / timeStep dayjs(times[i + 1]).diff(dayjs(times[i]), 'ms') / timeStep