[M] Move markarea to GraphUtils

This commit is contained in:
Hykilpikonna
2019-11-09 15:51:05 -05:00
parent d698f3d13a
commit f4ee2dadb6
2 changed files with 24 additions and 46 deletions
+23
View File
@@ -18,4 +18,27 @@ export default class GraphUtils
})
}
}
/**
* Get mark areas for percentage scores
*/
static getGradeMarkAreas()
{
return {
silent: true,
data:
[
// Above 100
[{itemStyle: {color: 'rgba(230,253,255,0.09)'}, yAxis: 120}, {yAxis: 100}],
// 90 to 100
[{itemStyle: {color: 'rgba(241,255,237,0.09)'}, yAxis: 100}, {yAxis: 90}],
// 80 to 90
[{itemStyle: {color: 'rgba(255,250,216,0.09)'}, yAxis: 90}, {yAxis: 80}],
// 70 to 80
[{itemStyle: {color: 'rgba(255,225,199,0.1)'}, yAxis: 80}, {yAxis: 70}],
// Below 70 (Fail)
[{itemStyle: {color: 'rgb(255,190,184, 0.09)'}, yAxis: 70}, {yAxis: -100}]
]
}
}
}
+1 -46
View File
@@ -42,53 +42,8 @@ export default class OverallLine extends Vue
series:
{
smooth: true,
// Quarter lines
markLine: GraphUtils.getTermLines(),
// Mark area
markArea:
{
silent: true,
data:
[
// Above 100
[
{
yAxis: 120,
itemStyle: {color: 'rgba(230,253,255,0.09)'}
}, {yAxis: 100}
],
// 90 to 100
[
{
yAxis: 100,
itemStyle: {color: 'rgba(241,255,237,0.09)'}
}, {yAxis: 90}
],
// 80 to 90
[
{
yAxis: 90,
itemStyle: {color: 'rgba(255,250,216,0.09)'}
}, {yAxis: 80}
],
// 70 to 80
[
{
yAxis: 80,
itemStyle: {color: 'rgba(255,225,199,0.1)'}
}, {yAxis: 70}
],
// Below 70 (Fail)
[
{
yAxis: 70,
itemStyle: {color: 'rgb(255,190,184, 0.09)'}
}, {yAxis: -100}
]
]
}
markArea: GraphUtils.getGradeMarkAreas()
},
xAxis:
{