Skip to content

Commit 16ed164

Browse files
authored
Remove the max line from the global support chart (#1130)
We are currently at 1k+ features, so I would expect the max line to be there. However, we currently calculate the max to be the max among the current values. We should remove that line for now as it may confuse. Instead, we need the timestamp of a feature's inception. We should revisit once web-platform-dx/web-features#714 is tackled.
1 parent 31a906d commit 16ed164

7 files changed

+2
-18
lines changed
-6.9 KB
Loading
-7.14 KB
Loading
-7.59 KB
Loading
-6.76 KB
Loading
-7.21 KB
Loading
-7.49 KB
Loading

frontend/src/static/js/components/webstatus-stats-page.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ export class StatsPage extends BaseChartsPage {
159159
}
160160
this.globalFeatureSupportChartDataObj = this.createDisplayDataFromMap(
161161
this.globalFeatureSupport,
162-
true,
163162
);
164163
});
165164
await Promise.all(promises); // Wait for all browsers to finish
@@ -189,7 +188,6 @@ export class StatsPage extends BaseChartsPage {
189188
}
190189
this.missingOneImplementationChartDataObj = this.createDisplayDataFromMap(
191190
this.missingOneImplementationMap,
192-
false,
193191
);
194192
});
195193
await Promise.all(promises); // Wait for all browsers to finish
@@ -253,7 +251,6 @@ export class StatsPage extends BaseChartsPage {
253251
// and stats page, https://github.com/GoogleChrome/webstatus.dev/issues/964.
254252
createDisplayDataFromMap(
255253
targetMap: Map<string, Array<BrowserReleaseFeatureMetric>>,
256-
addMax: boolean,
257254
): WebStatusDataObj {
258255
// Get the list of supported browsers.
259256
const browsers = this.supportedBrowsers;
@@ -263,9 +260,6 @@ export class StatsPage extends BaseChartsPage {
263260
for (const browser of browsers) {
264261
dataObj.cols.push({type: 'number', label: browser, role: 'data'});
265262
}
266-
if (addMax) {
267-
dataObj.cols.push({type: 'number', label: 'Max features', role: 'data'});
268-
}
269263

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

304-
if (addMax) {
305-
let maxCount = 0;
306-
for (const count of browserCountArray) {
307-
if (count) {
308-
maxCount = Math.max(maxCount, count);
309-
}
310-
}
311-
dataObj.rows.push([date, ...browserCountArray, maxCount]);
312-
} else {
313-
dataObj.rows.push([date, ...browserCountArray]);
314-
}
298+
dataObj.rows.push([date, ...browserCountArray]);
315299
}
316300
return dataObj;
317301
}
@@ -380,7 +364,7 @@ export class StatsPage extends BaseChartsPage {
380364
return html`
381365
<webstatus-gchart
382366
id="global-feature-support-chart"
383-
.hasMax=${true}
367+
.hasMax=${false}
384368
.containerId="${'global-feature-support-chart-container'}"
385369
.chartType="${'LineChart'}"
386370
.dataObj="${this.globalFeatureSupportChartDataObj}"

0 commit comments

Comments
 (0)