[O] Make bar graph vertical
This commit is contained in:
@@ -30,14 +30,13 @@ export default class GraphAverage extends Vue
|
|||||||
// X axis represents course names
|
// X axis represents course names
|
||||||
xAxis:
|
xAxis:
|
||||||
{
|
{
|
||||||
type: 'value'
|
type: 'category',
|
||||||
},
|
},
|
||||||
|
|
||||||
// Y axis represents GPAs and MaxGPAs
|
// Y axis represents GPAs and MaxGPAs
|
||||||
yAxis:
|
yAxis:
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'value'
|
||||||
data: this.courses.map(course => course.name)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
@@ -47,16 +46,16 @@ export default class GraphAverage extends Vue
|
|||||||
type: 'bar',
|
type: 'bar',
|
||||||
encode:
|
encode:
|
||||||
{
|
{
|
||||||
x: 1,
|
x: 0,
|
||||||
y: 0
|
y: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
encode:
|
encode:
|
||||||
{
|
{
|
||||||
x: 2,
|
x: 0,
|
||||||
y: 0
|
y: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user