mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
update colors for gpu power chart
This commit is contained in:
@@ -40,7 +40,7 @@ export default memo(function GpuPowerChart({ chartData }: { chartData: ChartData
|
|||||||
}
|
}
|
||||||
const keys = Object.keys(powerSums).sort((a, b) => powerSums[b] - powerSums[a])
|
const keys = Object.keys(powerSums).sort((a, b) => powerSums[b] - powerSums[a])
|
||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
newChartData.colors[key] = `hsl(${((keys.indexOf(key) * 360) / keys.length) % 360}, 60%, 55%)`
|
newChartData.colors[key] = `hsl(${(226 + (keys.indexOf(key) * 360) / keys.length) % 360}, 60%, 55%)`
|
||||||
}
|
}
|
||||||
return newChartData
|
return newChartData
|
||||||
}, [chartData])
|
}, [chartData])
|
||||||
|
|||||||
Reference in New Issue
Block a user