mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
[CourseStatistics] Change the location where barchart direction is done, previous breaks attempts
This commit is contained in:
+12
-9
@@ -148,15 +148,18 @@ export const ResultTab = ({
|
||||
/>
|
||||
{datasets
|
||||
.filter(data => data !== undefined)
|
||||
.map(data => (
|
||||
<PassRateChart
|
||||
data={data}
|
||||
isRelative={settings.isRelative}
|
||||
key={data.name}
|
||||
userHasAccessToAllStats={userHasAccessToAllStats}
|
||||
viewMode={settings.viewMode}
|
||||
/>
|
||||
))}
|
||||
.map(data => {
|
||||
data.stats.sort((a, b) => a.code - b.code) // Needs to be sorted ASC so that years on the barchart go from left to right
|
||||
return (
|
||||
<PassRateChart
|
||||
data={data}
|
||||
isRelative={settings.isRelative}
|
||||
key={data.name}
|
||||
userHasAccessToAllStats={userHasAccessToAllStats}
|
||||
viewMode={settings.viewMode}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</Section>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -390,7 +390,6 @@ export const SingleCourseStats = ({
|
||||
}
|
||||
}
|
||||
)
|
||||
.sort((a, b) => a.code - b.code) // Needs to be sorted back to ASC so that years on the barchart go from left to right
|
||||
|
||||
const totals = countTotalStats(formattedStats)
|
||||
const programmeStats: ProgrammeStats = {
|
||||
|
||||
Reference in New Issue
Block a user