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

PropTypeDefault
produced{ date: Date; value: number }[]
forecast{ date: Date; value: number }[]
producedLabelReact.ReactNode"Produced"
forecastLabelReact.ReactNode"Forecast"
formatValue(value: number) => stringone-decimal kW
formatTime(date: Date) => stringzero-padded hour
formatTooltipTime(date: Date) => stringformatTime
curveLineChartCurve"monotone"
heightnumber180
classNamestring

On this page