Fix default sizes on charts to make more sense
This commit is contained in:
parent
608ee7b865
commit
1bc1debbe8
|
@ -70,7 +70,7 @@ export const BinaryContractChart = (props: {
|
||||||
const isMobile = useIsMobile(800)
|
const isMobile = useIsMobile(800)
|
||||||
const containerRef = useRef<HTMLDivElement>(null)
|
const containerRef = useRef<HTMLDivElement>(null)
|
||||||
const width = useElementWidth(containerRef) ?? 0
|
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 xScale = scaleTime(visibleRange, [0, width - MARGIN_X])
|
||||||
const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0])
|
const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0])
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ export const ChoiceContractChart = (props: {
|
||||||
const isMobile = useIsMobile(800)
|
const isMobile = useIsMobile(800)
|
||||||
const containerRef = useRef<HTMLDivElement>(null)
|
const containerRef = useRef<HTMLDivElement>(null)
|
||||||
const width = useElementWidth(containerRef) ?? 0
|
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 xScale = scaleTime(visibleRange, [0, width - MARGIN_X])
|
||||||
const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0])
|
const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user