Skip to content

Commit b5a4f38

Browse files
committed
fix: fixed yaxis labels for barchart
1 parent b4aabfa commit b5a4f38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/visualizations/TimelineBarChart.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export default class ChartTimelineBars extends Vue<Bar> {
4343
} else if (this.resolution == 'week') {
4444
return ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
4545
} else if (this.resolution == 'month') {
46-
return ['1st', '2nd', '3rd'].concat(_.range(4, 31).map(d => `${d}th`));
46+
// FIXME: Needs access to the timeperiod start to know which month
47+
const daysInMonth = 31;
48+
return ['1st', '2nd', '3rd'].concat(_.range(4, daysInMonth + 1).map(d => `${d}th`));
4749
} else {
4850
console.error('Invalid resolution');
4951
}

0 commit comments

Comments
 (0)