The current run emissions scatter chart renders one point per run, which becomes harder to read and bit slow when an experiment has many runs. Add adaptive aggregation based on the visible date range and chart width.
Expected behavior
- Frontend computes a maxVisiblePoints budget from chart width.
- Backend returns raw runs when count is below the budget.
- Backend returns grouped buckets when count exceeds the budget.
- Grouped points use total/average emissions as the y-axis value.
- Grouped tooltip shows bucket range, run count, total emissions, average emissions/run, max emissions, energy consumed, and duration.
- Clicking a grouped point zooms into that bucket and refetches data.
- Repeated drill-down eventually shows individual runs.
- Clicking an individual run keeps current behavior and opens the run time series.
- Add reset zoom control to return to the original selected date range.
Proposed changes in the API
GET /experiments/{experiment_id}/runs/sums
?start_date=...
&end_date=...
&max_points=300
Response should indicate whether data is raw or aggregated:
{
"mode": "aggregated",
"items": [...]
}
Notes
- Choose the smallest interval that keeps points under the visible point budget.
- Default grouped y-axis can be either sum/total emissions, or average. Maybe show a dropdown?
The current run emissions scatter chart renders one point per run, which becomes harder to read and bit slow when an experiment has many runs. Add adaptive aggregation based on the visible date range and chart width.
Expected behavior
Proposed changes in the API
Response should indicate whether data is raw or aggregated:
Notes