Fix default sizes on charts to make more sense

This commit is contained in:
Marshall Polaris 2022-09-30 00:05:36 -07:00
parent 608ee7b865
commit 1bc1debbe8
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ export const BinaryContractChart = (props: {
const isMobile = useIsMobile(800)
const containerRef = useRef<HTMLDivElement>(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])

View File

@ -176,7 +176,7 @@ export const ChoiceContractChart = (props: {
const isMobile = useIsMobile(800)
const containerRef = useRef<HTMLDivElement>(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])