Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First week Jan, last week Dec getting cropped #8

Open
ashwinkumar6 opened this issue Aug 5, 2019 · 0 comments
Open

First week Jan, last week Dec getting cropped #8

ashwinkumar6 opened this issue Aug 5, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@ashwinkumar6
Copy link
Contributor

ashwinkumar6 commented Aug 5, 2019

  • A year can consist of 52/53 weeks.
  • The starting week of the year could vary depending on region,
    From moment.js documentation:
- The week of the year varies depending on which day is the first day of the week (Sunday, Monday, etc), and which week is the first week of the year.
- For example, in the United States, Sunday is the first day of the week. The week with January 1st in it is the first week of the year.
- In France, Monday is the first day of the week, and the week with January 4th is the first week of the year.
  • This would mean,
    • moment.week() on the last week of December could return a 53 / 52 / 1
    • moment.week() on the first week of January could return a 53 / 52 / 1
  • Currently this is not handled in the yearView and the monthView and would result in (refer screenshots)
    • yearView: last week of December or first week of January getting cropped
    • monthView: Only last week of December or first week of January is displayed rest of the weeks are cropped

Expected Behaviour

  • While rendering the chart grids in chart_grid.js for YearView and monthView, add conditions to handle the following scenarios
    • last week of December could be a 53 / 52 / 1
    • first week of January could be a 53 / 52 / 1

Actual Behaviour

  • Currently the chart assumes that the last week of December ends in week 52 and first week of Jan starts in week 1

Basic Information
kibana version: 6.4

Screenshots
yearView (Dec 2018): last week of Dec getting cropped
YearView(Dec)

yearView (Jan 2019): first week of Jan getting cropped
YearView(jan)

monthView (Jan 2019): only first week of Jan displayed
monthView

@aaronoah aaronoah added the bug Something isn't working label Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants