diff --git a/web/components/answers/answers-graph.tsx b/web/components/answers/answers-graph.tsx index 4252e0e6..a8d484e2 100644 --- a/web/components/answers/answers-graph.tsx +++ b/web/components/answers/answers-graph.tsx @@ -38,12 +38,8 @@ export const AnswersGraph = memo(function AnswersGraph(props: { const isLargeWidth = !width || width > 800 const labelLength = isLargeWidth ? 50 : 20 - const endTime = - resolutionTime || isClosed - ? latestTime.valueOf() - : // Add a fake datapoint in future so the line continues horizontally - // to the right. - latestTime.add(1, 'month').valueOf() + // Add a fake datapoint so the line continues to the right + const endTime = latestTime.valueOf() const times = sortBy([ createdTime, @@ -108,11 +104,12 @@ export const AnswersGraph = memo(function AnswersGraph(props: { }} colors={{ scheme: 'pastel1' }} pointSize={0} + curve="stepAfter" enableSlices="x" enableGridX={!!width && width >= 800} enableArea areaOpacity={1} - margin={{ top: 20, right: 28, bottom: 22, left: 40 }} + margin={{ top: 20, right: 20, bottom: 25, left: 40 }} legends={[ { anchor: 'top-left', diff --git a/web/components/contract/contract-prob-graph.tsx b/web/components/contract/contract-prob-graph.tsx index 82366e08..af2dfb1b 100644 --- a/web/components/contract/contract-prob-graph.tsx +++ b/web/components/contract/contract-prob-graph.tsx @@ -34,15 +34,9 @@ export const ContractProbGraph = memo(function ContractProbGraph(props: { : resolutionTime ?? Date.now() ) - if (resolutionTime || isClosed) { - times.push(latestTime.toDate()) - probs.push(probs[probs.length - 1]) - } else { - // Add a fake datapoint in future so the line continues horizontally - // to the right. - times.push(latestTime.add(1, 'month').toDate()) - probs.push(probs[probs.length - 1]) - } + // Add a fake datapoint so the line continues to the right + times.push(latestTime.toDate()) + probs.push(probs[probs.length - 1]) const points = probs.map((prob, i) => ({ x: times[i], y: prob * 100 })) const data = [{ id: 'Yes', data: points, color: '#11b981' }] @@ -61,7 +55,7 @@ export const ContractProbGraph = memo(function ContractProbGraph(props: { return (
= 800 ? 350 : 250) }} > formatTime(+time, lessThanAWeek), }} colors={{ datum: 'color' }} - pointSize={bets.length > 100 ? 0 : 10} + curve="stepAfter" + pointSize={0} pointBorderWidth={1} pointBorderColor="#fff" enableSlices="x" enableGridX={!!width && width >= 800} enableArea - margin={{ top: 20, right: 28, bottom: 22, left: 40 }} + margin={{ top: 20, right: 20, bottom: 25, left: 40 }} animate={false} />