CRINGE-38: Replace metrics-graphics dependency#7231
Open
Haseeb702 wants to merge 6 commits into
Open
Conversation
Haseeb702
commented
Jul 9, 2026
| @@ -67,74 +66,85 @@ SignatureReport.GraphsTab.prototype.loadControls = function () { | |||
| SignatureReport.GraphsTab.prototype.formatData = function (data) { | |||
Contributor
Author
There was a problem hiding this comment.
First thing to refactor was the data format, since chart.js doesn't accept the same data format as metrics-graphics.
Haseeb702
commented
Jul 9, 2026
| }); | ||
|
|
||
| // Each object in data.aggregates contains data for one date. | ||
| $.each(data.aggregates, function (i, dateData) { |
Contributor
Author
There was a problem hiding this comment.
Here we go through the top 4 terms being graphed and create a list of daily crash counts that align with the date list. The code iterates through the data for each date and maps the daily crash counts to each term. This is how the dataset for the line graph is built.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose:
This PR:
D3andmetrics-graphics, since they are both used only for the signature graph tab and can be safely removed.metrics-graphicssignature_tab_graphs.jsusingchart.js, which is a modern Javascript graphing library to replace themetrics-graphicsdependency and the old graphing codeManual Testing Plan: