Simply don't print zero (#954)

This commit is contained in:
Marshall Polaris 2022-09-28 14:20:28 -07:00 committed by GitHub
parent d55cedb36c
commit 83de206e9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ export const BinaryContractChart = (props: {
const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0]) const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0])
return ( return (
<div ref={containerRef}> <div ref={containerRef}>
{width && ( {width > 0 && (
<SingleValueHistoryChart <SingleValueHistoryChart
w={width} w={width}
h={height} h={height}

View File

@ -163,7 +163,7 @@ export const ChoiceContractChart = (props: {
const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0]) const yScale = scaleLinear([0, 1], [height - MARGIN_Y, 0])
return ( return (
<div ref={containerRef}> <div ref={containerRef}>
{width && ( {width > 0 && (
<MultiValueHistoryChart <MultiValueHistoryChart
w={width} w={width}
h={height} h={height}

View File

@ -37,7 +37,7 @@ export const NumericContractChart = (props: {
const yScale = scaleLinear([0, maxY], [height - MARGIN_Y, 0]) const yScale = scaleLinear([0, maxY], [height - MARGIN_Y, 0])
return ( return (
<div ref={containerRef}> <div ref={containerRef}>
{width && ( {width > 0 && (
<SingleValueDistributionChart <SingleValueDistributionChart
w={width} w={width}
h={height} h={height}

View File

@ -81,7 +81,7 @@ export const PseudoNumericContractChart = (props: {
return ( return (
<div ref={containerRef}> <div ref={containerRef}>
{width && ( {width > 0 && (
<SingleValueHistoryChart <SingleValueHistoryChart
w={width} w={width}
h={height} h={height}