Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 2 additions & 18 deletions frontend/src/static/js/components/webstatus-stats-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export class StatsPage extends BaseChartsPage {
}
this.globalFeatureSupportChartDataObj = this.createDisplayDataFromMap(
this.globalFeatureSupport,
true,
);
});
await Promise.all(promises); // Wait for all browsers to finish
Expand Down Expand Up @@ -189,7 +188,6 @@ export class StatsPage extends BaseChartsPage {
}
this.missingOneImplementationChartDataObj = this.createDisplayDataFromMap(
this.missingOneImplementationMap,
false,
);
});
await Promise.all(promises); // Wait for all browsers to finish
Expand Down Expand Up @@ -253,7 +251,6 @@ export class StatsPage extends BaseChartsPage {
// and stats page, https://github.com/GoogleChrome/webstatus.dev/issues/964.
createDisplayDataFromMap(
targetMap: Map<string, Array<BrowserReleaseFeatureMetric>>,
addMax: boolean,
): WebStatusDataObj {
// Get the list of supported browsers.
const browsers = this.supportedBrowsers;
Expand All @@ -263,9 +260,6 @@ export class StatsPage extends BaseChartsPage {
for (const browser of browsers) {
dataObj.cols.push({type: 'number', label: browser, role: 'data'});
}
if (addMax) {
dataObj.cols.push({type: 'number', label: 'Max features', role: 'data'});
}

// Map from date to an object with counts for each browser
const dateToBrowserDataMap = new Map<number, {[key: string]: number}>();
Expand Down Expand Up @@ -301,17 +295,7 @@ export class StatsPage extends BaseChartsPage {
browser => browserCounts[browser] || null,
);

if (addMax) {
let maxCount = 0;
for (const count of browserCountArray) {
if (count) {
maxCount = Math.max(maxCount, count);
}
}
dataObj.rows.push([date, ...browserCountArray, maxCount]);
} else {
dataObj.rows.push([date, ...browserCountArray]);
}
dataObj.rows.push([date, ...browserCountArray]);
}
return dataObj;
}
Expand Down Expand Up @@ -380,7 +364,7 @@ export class StatsPage extends BaseChartsPage {
return html`
<webstatus-gchart
id="global-feature-support-chart"
.hasMax=${true}
.hasMax=${false}
.containerId="${'global-feature-support-chart-container'}"
.chartType="${'LineChart'}"
.dataObj="${this.globalFeatureSupportChartDataObj}"
Expand Down