diff --git a/src/components/tideGraph/TidalGraphComponent.tsx b/src/components/tideGraph/TidalGraphComponent.tsx index 9eaeb25..76c9ed8 100644 --- a/src/components/tideGraph/TidalGraphComponent.tsx +++ b/src/components/tideGraph/TidalGraphComponent.tsx @@ -53,7 +53,10 @@ export function TidalGraphComponent({ data.date >= startTimestamp && data.date <= endTimestamp + (data) => + data.date >= startTimestamp && + data.date <= endTimestamp && + data.Height >= 0 )} gridAxis="none" dataKey="date" diff --git a/src/components/tideGraph/graphDataGenerator.ts b/src/components/tideGraph/graphDataGenerator.ts index d3938c9..9d8bdf7 100644 --- a/src/components/tideGraph/graphDataGenerator.ts +++ b/src/components/tideGraph/graphDataGenerator.ts @@ -84,12 +84,10 @@ export const graphDataGenerator = ( Math.abs(heightDifferenceToNextTide) / 2 ).toFixed(3) ); - if (derivedHeight >= 0) { - plotPoints.push({ - date: t, - Height: derivedHeight, - }); - } + plotPoints.push({ + date: t, + Height: derivedHeight, + }); } } }