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
4 changes: 3 additions & 1 deletion src/lib/speedometer/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export interface ChartInputs {
* score; Android also charts mWh, so it supplies its own.
*/
yLabel?: string;
/** Anchor the y axis at zero rather than fitting it to the data. */
beginAtZero?: boolean;
}

function stableJitter(seed: number): number {
Expand Down Expand Up @@ -261,7 +263,7 @@ export function buildChartOptions(
title: { display: true, text: 'Date' }
},
y: {
beginAtZero: false,
beginAtZero: inputs.beginAtZero ?? false,
title: { display: true, text: yLabel }
}
}
Expand Down
7 changes: 0 additions & 7 deletions src/lib/speedometer/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ export const PLATFORMS: readonly PlatformConfig[] = [
safariPlatform: 'macosx2700-aarch64-shippable',
group: 'desktop'
},
{
key: 'osx',
label: 'Mac (Intel)',
platforms: ['macosx1470-64-nightlyasrelease', 'macosx1470-64-shippable'],
supportsSafari: false,
group: 'desktop'
},
{
key: 'android-s24',
label: 'Android (S24)',
Expand Down
3 changes: 2 additions & 1 deletion src/routes/navbench/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
markers: [],
annotations: annotationsWithinDays(annotationsFor(selectedTest), range),
reference: selection,
yLabel: 'Score (higher is better)'
yLabel: 'Score (higher is better)',
beginAtZero: true
});

const chartConfig = $derived(buildChartData(chartInputs));
Expand Down
3 changes: 2 additions & 1 deletion src/routes/navbench/SubtestChart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
markers: [],
annotations: annotationsWithinDays(annotationsFor(test), days),
reference: null,
yLabel: 'Score (higher is better)'
yLabel: 'Score (higher is better)',
beginAtZero: true
});

const chartData = $derived(buildChartData(inputs));
Expand Down
Loading