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

Add filter possibility for body weight chart #1696

Closed
rolandgeider opened this issue Jun 12, 2024 · 4 comments
Closed

Add filter possibility for body weight chart #1696

rolandgeider opened this issue Jun 12, 2024 · 4 comments
Assignees

Comments

@rolandgeider
Copy link
Member

At the moment the body weight chart shows all the entries, which can be a lot if they were imported. We should only show the last year (?), and provide some toggle buttons to show all / last year / last six months (or other useful ranges)

@ChrisUlicny
Copy link

Hi, can i work on this ?

@ChrisUlicny
Copy link

This issue is addressed by #1808 and wger-project/react#988.

@Dieterbe
Copy link
Contributor

Dieterbe commented Nov 4, 2024

We should only show the last year (?)

one approach i added into the flutter app is to make it density aware.
e.g. if you would like to see at least 20 datapoints on the chart, but not (say) more than 100 to avoid getting too much noise, you can figure out the best datarange programatically. it depends on how many pixels wide a chart is. requires some experimentation but a datapoint every 5-25 pixels probably looks good.
(what i built for the flutter dashboard widget is a bit more simplistic but achieves more or less the same)

however, this means you first get all entries, and then filter them. (which i think is a valid tradeoff. much better to present a useful visualization to the user than it is trying to optimize api calls that don't need optimizing)

another useful approach IMHO (and what i also implemented in the weight view of flutter) is go by whatever is the date range of the currently active nutrition plan.

i think these two techniques are more pragmatic and relevant than predefined ranges that don't have a particular meaning to the user.

@rolandgeider
Copy link
Member Author

that's a good idea, I've opened a new issue for the "smarter" charts (but let's keep this one since it's an improvement over the current state)

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

3 participants