TimeseriesChartsForecast
Packaged composed charts with toolbar and charts.
Wraps TimeseriesModelsProvider and TimeseriesChartsProvider, then optional Toolbar, Builder + Chart. lat and lon are required. Charts load from GET /api/platform/timeseries-point-forecast (or marine-timeseries-point-forecast when domain is marine) unless you pass charts or getCharts. One config group becomes one composed chart (LINE + DIRECTION + VALUE + PRECIPITATION_TYPE). Applies ip-platform for you.
import { TimeseriesChartsForecast } from '@infoplaza/platform/timeseries-charts'- Do not pass a models array. The catalog is loaded from GET /api/platform/timeseries-models (or marine-timeseries-models when domain is marine).
- domain defaults to land. Set domain="marine" on Forecast or TimeseriesModelsProvider.
- Builder stacks every group in elementGroups.
- showToolbar defaults to true. showFooter is off for now (group-visibility pills are disabled).
Required props
| Prop | Type | Default | Description |
|---|---|---|---|
| lat | number | — | Latitude of the forecast point. |
| lon | number | — | Longitude of the forecast point. |
Optional props
| Prop | Type | Default | Description |
|---|---|---|---|
| basePath | string | '/api/platform' | Auth handler mount path. |
| domain | 'land' | 'marine' | 'land' | Which PlatformAuth proxy to use. land hits timeseries-models and timeseries-point-forecast; marine hits the marine-timeseries-* routes. |
| model / defaultModel / onModelChange | string | — | Preferred catalog slug. model without onModelChange (or defaultModel) is the initial selection; model + onModelChange is controlled. If the slug is not in the fetched catalog, the first model is used unless onModelFallback picks one. |
| onModelFallback | (args: TimeseriesModelFallbackArgs) => string | — | Optional. Called with { models, model, lat, lon } when the requested slug is missing from the location-filtered catalog or is marked available: false. Return the slug to show. Unknown, empty or unchanged slugs are ignored and the built-in first-model fallback is used. Not called while the catalog loads. The fallback is not reported through onModelChange; the requested model stays as passed. |
| showToolbar | boolean | true | Render the model / run pill toolbar. |
| showFooter | boolean | false | Group-visibility pills. Off for now; leave false. |
| elementGroups | TimeseriesChartElementGroup[] | DEFAULT_LAND_TIMESERIES_CHART_GROUPS when domain is land, DEFAULT_MARINE_TIMESERIES_CHART_GROUPS when marine | Chart config. Each group is one composed chart. Item view is LINE, DIRECTION, VALUE, or PRECIPITATION_TYPE. LINE items may set optional line (color, strokeWidth, strokeDasharray, opacity, type). Groups may set optional yAxis.domain ([number | auto | dataMin | dataMax, ...]); omit to keep Y pinned at 0. Graph config.domain remains the X-axis time range. A defined array replaces domain defaults (it does not merge). Omit to use land or marine defaults from domain. |
| visibleGroups / defaultVisibleGroups / onVisibleGroupsChange | string[] | — | Which group keys are shown. Defaults to every group. |
| charts | TimeseriesChartBlock[] | — | Host-owned chart blocks. When defined, skips the point-forecast fetch. |
| getCharts | (options) => TimeseriesChartBlock[] | — | Sync override when charts is omitted. Receives model, run, models, elementGroups, visibleGroups, locale, timezone. |
| locale | string | 'en' | Date axis labels: 'en' | 'nl' | 'de' | 'it' | 'es' | 'fr'. |
| plotHeight | number | 320 | Plot-area height in pixels. Also sizes the Builder loading skeleton. Chart/Graph can override. fixedHeight still overrides the total Recharts container. |
| hourInterval | 1 | 3 | 6 | 6 | Vertical unlabeled hour grid lines in the plot. Day-boundary ticks stay on the X axis. For 3h and 6h, strip overlays (direction, value, precipitation type) show the latest point in each bucket, centered; 1h keeps hourly strip points. LINE series are unchanged. Chart/Graph can override. |
| thresholds | TimeseriesChartThresholds | null | — | Optional project-style object; only conditions and ignored_hours are used. Each chart keeps AND-groups whose elementIds are all LINE series on that chart, then draws dashed Y-lines and a status strip above the date labels. Chart/Graph can override. |
| className | string | — | Extra class on the root wrapper. |
| timestamp | number | null | — | Selected unix timestamp in seconds. The host owns this value. A reference line marks that hour. Omit it and the chart stays hover-only. |
| onTimestampChange | (timestamp: number) => void | — | Called with the clicked hour in unix seconds. A day swipe does not fire it. |
| hoverTimestamp | number | null | — | Preview cursor in unix seconds. Draws the crosshair when the pointer is off the plot. Does not seek timestamp. Flows to Chart/Graph. |
| onHover | (hover: TimeseriesGraphHover | null) => void | — | Pointer sample for the hovered hour: { timestamp, value, values }. timestamp is unix seconds. value is the first finite LINE series. values maps every LINE slug to a number or null. Null when the pointer leaves the plot. Does not fire when hoverTimestamp is set from outside. |
Example
<TimeseriesChartsForecast
lat={52.3676}
lon={4.9041}
model="gfs"
locale="en"
/>