[O] Adjust to correct color after sorting

This commit is contained in:
Hykilpikonna
2019-11-09 22:52:52 -05:00
parent 0af3cee18b
commit cca9d5a240
+8 -3
View File
@@ -37,9 +37,14 @@ export default class TypePie extends Vue
series:
{
type: 'pie',
data: this.course.assignmentTypes
.map(t => {return {value: t.weight, name: t.name}})
.sort((a, b) => a.value - b.value)
data: this.course.assignmentTypes.map((t, i) => {return {
value: t.weight,
name: t.name,
itemStyle:
{
color: Constants.THEME.colors[i]
}
}}).sort((a, b) => a.value - b.value)
}
};