Code Insights: Add separated line chart content generator fro gql api
Created by: vovakulikov
Related to this https://github.com/sourcegraph/sourcegraph/issues/27879 but doesn't close
Context
This PR implements a special line chart generator for GQL API. Prior to this PR generation of line, chart content was used sorted on BE and resorted to FE data series, we used a sorted list for series and definitions and mapped them with an index. With the new GQL API all data series and all their definitions are indexed (they have a unique seriesId
field). Hence we can connect data series and their definitions by this id.
How to test
- Create search based insight with more than 1 series
- Check that all series match their definitions in the live preview chart and insight on the dashboard page (data of series match with series name, color, query string)