Read the tide forecast at any time and see when it is expected to reach a reference height, and for how long.
Tide Height Window · Preview
Loading widget…
Preparing integration examples…
Source under review
The source code and files will be available after this version passes review.
Idle
API contract
Props for integrating the React component in your app.
daysreadonly TideDay[] | null
Forecast days in display order, with a stable ID, label and samples. Pass null when unavailable or an empty array for an empty forecast. Omit to use the built-in example.
referenceHeightnumber | null
Reference height in metres on the same vertical datum as the readings. No comparison is calculated for external data without a finite reference.
station / timeZonestring / string
Station name and optional label for the local times already provided by the host.
maxGapMinutesnumber
Optional positive maximum interval between consecutive readings. Longer gaps and null heights break the chart and windows.
Data and integration
Preview
A two-day forecast for the fictional Kestrel Inlet station with a reference line, a time cursor and an in-card list of forecast windows.
Inputs
Each TideDay has a stable id, a display label and a samples array. Sample minute is a non-negative integer offset on the day’s local clock (0 = midnight, 1440 = the following midnight). Metres is a finite height or null for a missing reading. Set station and optionally timeZone to identify that clock. Set referenceHeight in metres above the same vertical datum and maxGapMinutes to the longest valid interval between samples when the feed has a known cadence.
Source options
Map a tide forecast for the chosen station, keep its original vertical datum and update the days by ID. Convert provider times to your station’s local forecast clock before passing data in. For a day with a repeated or skipped local hour, use a consistent unambiguous clock such as UTC and label it accordingly. The host supplies the reference height separately.
Actions
Select a forecast day. Tap or drag the chart to read a time, or use the arrow keys (one minute), Page Up/Down (one hour) and Home/End (forecast bounds). Open Windows to see every interval with its duration. Select an interval to move the cursor to its midpoint. The selected time stays in place on release and on updates to that day, within the updated forecast bounds.
Integration requirements
Samples are sorted by minute and the last valid entry at a duplicate minute wins, including a null reading. The widget interpolates linearly between adjacent known readings and estimates intervals at or above the reference within the forecast coverage. It does not extrapolate or bridge null readings or gaps longer than maxGapMinutes. Without that option, consecutive known readings can be interpolated regardless of spacing. Window times and durations are rounded to the nearest minute for display. A reference of null or invalid height disables comparisons. Passing null for days means the feed is unavailable. The chart shows predicted tide and reference height only.