Thank you again!
It pains me to do one more feature request.
I would like the option to have bars instead of the graph for the daily display as well.
It probably was quite the effort to put the graph in, but the issue with the graph, in my opinion, is how days close to each other are not really well distinguishable.
E.g. on day 19 I read 100 pages, on day 20 I read 50 pages. Day 21 then 0 pages. For the graph, this one one straight line where you can easily miss the read pages on day 20. With bars, this is visible out of the box.
I hacked the get_month_html function to display a specific month for the attached demo screenshots.
I took some sample screenshots with the described example: day 19 100 pages and day 20 50 pages, or only day 19 100 pages - for both graph and bar.
This is how the function looks for testing:
Code:
def get_month_html(self, _data: dict[str, dict]) -> str:
# Bar model
daily_bar = v_bar
daily_page_count = self.daily_page_count()
# Get a bar for each day
bars = []
for i in daily_page_count["sep"]:
bar = daily_bar.format(str(daily_page_count["sep"][i]), daily_page_count["sep"][i], i, "")
bars.append(bar)
bars_string = ''.join(str(b) for b in bars)
# Insert the bars in the html file
daily_html = v_html.replace('<!-- Placeholder -->', bars_string)
# Format html
bar_color, text_color, background_color = self.get_colors()
daily_html = daily_html.format(text_color, bar_color, background_color, _('SEP READINGS'))
return daily_html
Ideally there could also be another config setting like "Use bar graph for daily display" which will then switch between the two implementations inside the "daily_pages" function.
Thank your for your time you put into this project so far!