mirror of
https://github.com/Roslund/sthlm-mesh.git
synced 2026-10-30 23:41:58 +01:00
sort by firmware version, not count
This commit is contained in:
1 parent
8df3b345a7
commit
c445eb67c6
1 file changed
+2
-2
@@ -35,8 +35,8 @@ async function firmwareVersionGraph() {
|
||||
|
||||
console.log(statsArray)
|
||||
|
||||
// Sort by count descending
|
||||
const sorted = statsArray.sort((a, b) => b.count - a.count);
|
||||
// Sort by firmware version descending
|
||||
const sorted = statsArray.sort((a, b) => b.version.localeCompare(a.version));
|
||||
|
||||
const labels = sorted.map(entry => entry.version);
|
||||
const counts = sorted.map(entry => entry.count);
|
||||
|
||||
Reference in new issue
Block a user