Skip to content

Commit

Permalink
fix: fixed yaxis labels for barchart
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Jun 10, 2021
1 parent b4aabfa commit b5a4f38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/visualizations/TimelineBarChart.vue
Expand Up @@ -43,7 +43,9 @@ export default class ChartTimelineBars extends Vue<Bar> {
} else if (this.resolution == 'week') {
return ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
} else if (this.resolution == 'month') {
return ['1st', '2nd', '3rd'].concat(_.range(4, 31).map(d => `${d}th`));
// FIXME: Needs access to the timeperiod start to know which month
const daysInMonth = 31;
return ['1st', '2nd', '3rd'].concat(_.range(4, daysInMonth + 1).map(d => `${d}th`));
} else {
console.error('Invalid resolution');
}
Expand Down

1 comment on commit b5a4f38

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are screenshots of this commit:

Screenshots using aw-server v0.10.0 (click to expand)

Screenshots using aw-server-rust master (click to expand)

Screenshots using aw-server-rust v0.10.0 (click to expand)

CML watermark

Please sign in to comment.