Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5a102bc
Add type definitions for TimeSeriesForecastChart
annacmc Jan 29, 2026
89b33a0
Add data transformation hook for forecast data splitting
annacmc Jan 29, 2026
c6d6be0
Add forecast divider component
annacmc Jan 29, 2026
96845d0
Add TimeSeriesForecastChart component with styles
annacmc Jan 29, 2026
324f32b
Add TimeSeriesForecastChart exports to package
annacmc Jan 29, 2026
628f8d8
Add TimeSeriesForecastChart Storybook stories
annacmc Jan 29, 2026
db32d18
Add changelog entry for TimeSeriesForecastChart component
annacmc Jan 29, 2026
767b628
Address Copilot review feedback
annacmc Jan 30, 2026
642e619
Add i18n to TimeSeriesForecastChart default series keys
annacmc Jan 29, 2026
d8c19f3
Remove unused useChartLegendItems from TimeSeriesForecastChart
annacmc Jan 29, 2026
a31a47f
Align forecast line dasharray with divider for visual consistency
annacmc Jan 29, 2026
e2868ab
Add legend prop types to TimeSeriesForecastChartProps
annacmc Jan 29, 2026
b347363
Add legend props to TimeSeriesForecastChart component
annacmc Jan 29, 2026
0713b65
Add displayName to TimeSeriesForecastChartWithProvider
annacmc Jan 29, 2026
2555312
Add compound composition pattern to TimeSeriesForecastChart
annacmc Jan 29, 2026
d4d2a90
Add useChartRegistration to TimeSeriesForecastChart
annacmc Jan 29, 2026
ff3733b
Add changelog entry for TimeSeriesForecastChart improvements
annacmc Jan 29, 2026
eec1f21
Add type definitions for TimeSeriesForecastChart
annacmc Jan 29, 2026
48ee13b
Add data transformation hook for forecast data splitting
annacmc Jan 29, 2026
ffa8e08
Add forecast divider component
annacmc Jan 29, 2026
a0ec5b9
Add TimeSeriesForecastChart component with styles
annacmc Jan 29, 2026
c564af0
Add TimeSeriesForecastChart exports to package
annacmc Jan 29, 2026
ff05163
Add TimeSeriesForecastChart Storybook stories
annacmc Jan 29, 2026
a25de79
Add changelog entry for TimeSeriesForecastChart component
annacmc Jan 29, 2026
6c926a5
Address Copilot review feedback
annacmc Jan 30, 2026
1e081b5
Fix TimeSeriesForecastChart API consistency and minor issues
annacmc Jan 30, 2026
b30f774
Address Copilot feedback on array concat and RTL padding
annacmc Jan 30, 2026
a3c249e
Fix tooltip snapping to band instead of data lines
annacmc Jan 30, 2026
cb85ab5
Fix tooltip to work across all data points using hidden series
annacmc Jan 30, 2026
5bd77ea
Add missing allPoints property in empty data case
annacmc Jan 30, 2026
36f4a26
Merge remote-tracking branch 'origin/add/time-series-forecast-chart' …
annacmc Jan 30, 2026
f0e5b67
Add TimeSeriesForecast Chart to changelog
annacmc Jan 30, 2026
43ea4ce
Address Copilot review feedback
annacmc Jan 30, 2026
a84ad0f
Merge branch 'add/time-series-forecast-chart-docs' into add/area-char…
annacmc Feb 17, 2026
0fa1697
Merge branch 'add/time-series-forecast-chart-docs' into add/area-char…
annacmc Feb 17, 2026
41c2314
Remove duplicate typesVersions entry in package.json
annacmc Feb 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

TimeSeriesForecastChart: Add compound composition pattern and full legend prop parity.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function useForecastData< D >( {
transformed.sort( ( a, b ) => a.date.getTime() - b.date.getTime() );

// 3. Split by forecastStart
// Both series include the transition point so the lines connect seamlessly visually
// Both series include the transition point so the lines connect seamlessly
const forecastStartTime = forecastStart.getTime();
const historical = transformed.filter( p => p.date.getTime() <= forecastStartTime );
const forecast = transformed.filter( p => p.date.getTime() >= forecastStartTime );
Expand All @@ -101,7 +101,11 @@ export function useForecastData< D >( {

// Add some padding to y domain (ensure minimum padding to avoid zero-height scales)
const yPadding = Math.max( ( maxY - minY ) * 0.1, 1 );
const yDomain: [ number, number ] = [ minY - yPadding, maxY + yPadding ];
const yMinWithPadding = minY - yPadding;
const yDomain: [ number, number ] = [
minY >= 0 ? Math.max( 0, yMinWithPadding ) : yMinWithPadding,
maxY + yPadding,
];

// 6. Compute x domain (use reduce to avoid stack overflow on large arrays)
const allDateTimes = transformed.map( p => p.date.getTime() );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.time-series-forecast-chart {
display: flex;
flex-direction: column;
position: relative;

&__svg-wrapper {
Expand All @@ -15,6 +17,10 @@
}
}

&--legend-top {
flex-direction: column-reverse;
}

svg {
overflow: visible;
}
Expand Down Expand Up @@ -50,6 +56,10 @@
border-radius: 3px;
background: var(--charts-forecast-badge-background, rgba(0, 0, 0, 0.1));
}

&__legend {
padding-block-start: 8px;
}
}

@keyframes rise {
Expand Down
Loading
Loading