diff --git a/app/assets/javascripts/visualisations/timeseries.ts b/app/assets/javascripts/visualisations/timeseries.ts index e4cda2d2f8..d22fd6bac7 100644 --- a/app/assets/javascripts/visualisations/timeseries.ts +++ b/app/assets/javascripts/visualisations/timeseries.ts @@ -266,14 +266,14 @@ export class TimeseriesGraph extends SeriesExerciseGraph { } else if (this.binStep < 168) { // binning per multiple days const format = d3.timeFormat(i18n.t("date.formats.weekday_long")); message = ` - ${format(d.date)} - ${format(new Date(d.date - this.binStep * 3600000))}: + ${format(d.date)} - ${format(new Date(d.date + this.binStep * 3600000))}:
`; } else { // binning per week(s) const weekDay = d3.timeFormat(i18n.t("date.formats.weekday_long")); const monthDay = d3.timeFormat(i18n.t("date.formats.monthday_long")); message = ` - ${weekDay(d.date)} - ${monthDay(new Date(d.date - this.binStep * 3600000))}: + ${weekDay(d.date)} - ${monthDay(new Date(d.date + this.binStep * 3600000))}:
`; }