Simply don't print zero

This commit is contained in:
Marshall Polaris 2022-09-28 14:15:10 -07:00
parent d55cedb36c
commit 98f9fc13af
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}