Applying several hacks to draw labels better -- still not close to great, but bearable now. First we consider 0 amts as non-negative for annotations so they go up not down on the graph :) Second, I am applying a rough approach of knowing where the last label was drawn and draw below that, only do this for negative amts, and even then the difference between y-coords in the y-axis scale and pixels for offsets of labels, just are too annoying

This commit is contained in:
2026-01-18 22:23:04 +11:00
parent a46b8f895a
commit e104dd8270
2 changed files with 38 additions and 16 deletions

View File

@@ -34,7 +34,7 @@ def bill_amount_today(finance, day, bill_data, bt_id_name, total ):
def add_annotation(finance, dt, total, delta, text):
tm = dt.timestamp() * 1000
if delta > 0:
if delta >= 0:
text += f": ${int(abs(delta))}"
else:
text += f": -${int(abs(delta))}"