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 toggle to include zero in line charts #1799

Closed
wants to merge 1 commit into from

Conversation

Grulfen
Copy link
Contributor

@Grulfen Grulfen commented Apr 29, 2024

In line charts I sometimes want to include zero in the graph to see the "total" state, and so that small changes dont look like large changes.

To help with this I added an "Include zero" toggle to line charts, it looks like this:

Include zero not toggled:
image

Include zero toggled:
image

If there are better ways toggle this in the UI I'm happy to update this PR.

@yagebu
Copy link
Member

yagebu commented May 3, 2024

Hi, thanks for the PR :)

This sounds like a useful option to include - however, I'm not sure on whether we should even have an option or just make "Include zero" the default. In particular for the area chart, it seems odd that we don't always include zero.

If we have this as an option, I'd like to include it maybe behind a dropdown menu, this area above the chart is getting a bit crowded.

@Grulfen
Copy link
Contributor Author

Grulfen commented May 4, 2024

It sounds like we have four ways to go forward:

  • Make "Include zero" the default. <--- This is my favourite, given we are ok with changing current behaviour
    • This will make the current visualization no longer available
  • Make "Include zero" the default for area charts, but not line charts
    • Both "Include zero" and not possible. But not very intuitive that area charts would have this difference.
  • Add a dropdown menu
  • Keep current behaviour

What do you think?

@Grulfen
Copy link
Contributor Author

Grulfen commented May 9, 2024

After some trial I have changed my mind and prefer having only area chart have include zero and line charts have the current behaviour.

#1803

@yagebu
Copy link
Member

yagebu commented May 16, 2024

Merged the other one instead :)

@yagebu yagebu closed this May 16, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants