[F] Format date so that the chart can read it

This commit is contained in:
Hykilpikonna
2019-10-20 12:58:30 -04:00
parent 3a9a65920e
commit a4be712bd7
@@ -2,6 +2,7 @@ import {Component, Prop, Vue} from 'vue-property-decorator';
import {Assignment, Course} from '@/components/app/app'; import {Assignment, Course} from '@/components/app/app';
import {GPAUtils} from '@/utils/gpa-utils'; import {GPAUtils} from '@/utils/gpa-utils';
import Constants from '@/constants'; import Constants from '@/constants';
import {FormatUtils} from '@/utils/format-utils';
@Component({ @Component({
}) })
@@ -92,7 +93,7 @@ export default class CourseScatter extends Vue
*/ */
private static assignmentsData(assignments: Assignment[]) private static assignmentsData(assignments: Assignment[])
{ {
return assignments.map(a => [a.date, a.score / a.scoreMax]); return assignments.map(a => [FormatUtils.toChartDate(a.date), a.score / a.scoreMax]);
} }
afterConfig(options: any) afterConfig(options: any)