Solar Forecast Chart
Displays a line chart of solar forecast data.
Usage
import SolarForecastChart from '@epilot/spark-ui/solar-forecast-chart'<SolarForecastChart produced={produced} forecast={forecast} />produced and forecast are both arrays of { date: Date; value: number } points. produced draws as a solid line and forecast as a dashed line. The chart sizes itself to its container; compose a title and any summary around it.
Built on LineChart. Use the primitive when you need a different series layout than produced/forecast.
API Reference
| Prop | Type | Default |
|---|---|---|
produced | { date: Date; value: number }[] | — |
forecast | { date: Date; value: number }[] | — |
producedLabel | React.ReactNode | "Produced" |
forecastLabel | React.ReactNode | "Forecast" |
formatValue | (value: number) => string | one-decimal kW |
formatTime | (date: Date) => string | zero-padded hour |
formatTooltipTime | (date: Date) => string | formatTime |
curve | LineChartCurve | "monotone" |
height | number | 180 |
className | string | — |