From 1bc1debbe8db50f2a14f5614fed652510729be86 Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Fri, 30 Sep 2022 00:05:36 -0700 Subject: [PATCH] Fix default sizes on charts to make more sense --- web/components/charts/contract/binary.tsx | 2 +- web/components/charts/contract/choice.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/components/charts/contract/binary.tsx b/web/components/charts/contract/binary.tsx index 264e1e3b..a3f04a29 100644 --- a/web/components/charts/contract/binary.tsx +++ b/web/components/charts/contract/binary.tsx @@ -70,7 +70,7 @@ export const BinaryContractChart = (props: { const isMobile = useIsMobile(800) const containerRef = useRef(null) const width = useElementWidth(containerRef) ?? 0 - const height = props.height ?? (isMobile ? 250 : 350) + const height = props.height ?? (isMobile ? 150 : 250) const xScale = scaleTime(visibleRange, [0, width - MARGIN_X]) const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0]) diff --git a/web/components/charts/contract/choice.tsx b/web/components/charts/contract/choice.tsx index 1908f98f..7c9ec07a 100644 --- a/web/components/charts/contract/choice.tsx +++ b/web/components/charts/contract/choice.tsx @@ -176,7 +176,7 @@ export const ChoiceContractChart = (props: { const isMobile = useIsMobile(800) const containerRef = useRef(null) const width = useElementWidth(containerRef) ?? 0 - const height = props.height ?? (isMobile ? 150 : 250) + const height = props.height ?? (isMobile ? 250 : 350) const xScale = scaleTime(visibleRange, [0, width - MARGIN_X]) const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0])