Fix benchmark.js (#18890)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2025-01-25 21:19:52 +01:00 committed by GitHub
parent 827009985d
commit 83dc1fea6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -121,7 +121,7 @@ function updateChart(initialDatasets = []) {
initialDatasets.length > 0 ? initialDatasets : Object.keys(data); initialDatasets.length > 0 ? initialDatasets : Object.keys(data);
// Create the datasets for the selected algorithms. // Create the datasets for the selected algorithms.
const datasets = Object.keys(data).map((algorithm, i) => { const datasets = selectedAlgorithms.map((algorithm, i) => {
const baseColor = const baseColor =
colorMap[algorithm] || `hsl(${Math.random() * 360}, 70%, 50%)`; colorMap[algorithm] || `hsl(${Math.random() * 360}, 70%, 50%)`;
const lineColor = const lineColor =
@ -144,7 +144,7 @@ function updateChart(initialDatasets = []) {
pointBackgroundColor: lineColor, pointBackgroundColor: lineColor,
pointBorderColor: "#ffffff", // Add a border around points for contrast. pointBorderColor: "#ffffff", // Add a border around points for contrast.
borderWidth: i === 0 ? 3 : 1.5, // Slightly increase line size for the primary dataset. borderWidth: i === 0 ? 3 : 1.5, // Slightly increase line size for the primary dataset.
hidden: !initialDatasets.includes(algorithm), hidden: false,
}; };
}); });