Skip to content
Snippets Groups Projects
Commit f8fb5c34 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

actually fix the sorting

parent fc1392e9
Branches
Tags
No related merge requests found
......@@ -35,11 +35,7 @@ export function ScrollableMatrix({ dataLookup, rowInfo, categoryLookup, isTickIc
Array.from(dataLookup.entries()).sort(
([nrenA], [nrenB]) => nrenA.localeCompare(nrenB)
).forEach(([_nren, nrenData]) => {
const sortedNrenData = Array.from(nrenData.entries()).sort(
([yearA], [yearB]) => yearA - yearB
);
sortedNrenData.forEach(([_year, yearData]) => {
console.log(_year)
nrenData.forEach((yearData) => {
const valuesForCategory = yearData.get(categoryKey);
if (!valuesForCategory) return;
......@@ -80,6 +76,10 @@ export function ScrollableMatrix({ dataLookup, rowInfo, categoryLookup, isTickIc
return nrenYears;
}, {});
for (const nren in nrenYears) {
nrenYears[nren].sort((a, b) => a - b)
}
const categoryContent = (
<CollapsibleBox title={categoryTitle} startCollapsed key={categoryKey} theme="-matrix">
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment