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

Datas does not gather well when yearly period time is defined #24

Open
MathieuMaes182 opened this issue May 13, 2024 · 0 comments
Open

Comments

@MathieuMaes182
Copy link

MathieuMaes182 commented May 13, 2024

It appears that when using the yearly period time format, datas are still displayed according to their months.

I've been creating a PR that fix the problem:

  • by setting month and day to 1 and 1 by default if you choose the yearly period (those ones are not relevant when datas are displayed by years)
  • and by using the DATE_FORMAT doctrine function (instead of DATE) (need to be import by the user in his doctrine.yaml file). The date format is passed as a parameter of the query builder. I've defined the three formats in the DataFetcher\Data class as constants, and created a function that returns the format according to what it receives in the configuration.

The two screenshots here shows how the plugin is working now:
image
image

And here find how it works with the fixes:
image
image

Here is the link to the PR: #23

I remain available here to answer any questions or to discuss the choices I've made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant