[O] Adjust to correct color after sorting
This commit is contained in:
@@ -37,9 +37,14 @@ export default class TypePie extends Vue
|
|||||||
series:
|
series:
|
||||||
{
|
{
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
data: this.course.assignmentTypes
|
data: this.course.assignmentTypes.map((t, i) => {return {
|
||||||
.map(t => {return {value: t.weight, name: t.name}})
|
value: t.weight,
|
||||||
.sort((a, b) => a.value - b.value)
|
name: t.name,
|
||||||
|
itemStyle:
|
||||||
|
{
|
||||||
|
color: Constants.THEME.colors[i]
|
||||||
|
}
|
||||||
|
}}).sort((a, b) => a.value - b.value)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user