Skip to content
Snippets Groups Projects

insights: add/remove data series, update series visual metadata

Merged Administrator requested to merge insights/api/series-update into main

Created by: CristinaBirkel

Partial implementation for https://github.com/sourcegraph/sourcegraph/issues/25979

Description

This is a partial implementation of updating data series on insights:

  • Update visual metadata (label and color)
  • Add/remove series
    • Add a series by including a dataSeries with no seriesId field
    • Remove a series by excluding it from the dataSeries array

To finish this issue, the query, timeScope and repositoryScope will need to be updated. These will require more work because they affect the actual data that needs to be generated for the chart.

I have a few notes for discussion and will leave them as comments in the PR.

Testing Steps

  1. Query updateLineChartSearchInsight for an insight with at least one dataSeries, and modify the dataSeries.options and see that they return as expected.
  2. Run the same query, but add another dataSeries, this time leaving out the seriesId field. Verify that a new series is created and attached.
  3. Now exclude one of the dataSeries and verify that it gets removed.

Merge request reports

Merged by avatar (Jul 5, 2025 2:36pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading