fava icon indicating copy to clipboard operation
fava copied to clipboard

add toggle to include zero in line charts

Open Grulfen opened this issue 1 year ago • 2 comments

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.

Grulfen avatar Apr 29 '24 20:04 Grulfen

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.

yagebu avatar May 03 '24 16:05 yagebu

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 avatar May 04 '24 09:05 Grulfen

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

https://github.com/beancount/fava/pull/1803

Grulfen avatar May 09 '24 07:05 Grulfen

Merged the other one instead :)

yagebu avatar May 16 '24 18:05 yagebu