diff --git a/nummi/history/templates/history/plot.html b/nummi/history/templates/history/plot.html
index 9d79dc8..b96e510 100644
--- a/nummi/history/templates/history/plot.html
+++ b/nummi/history/templates/history/plot.html
@@ -70,8 +70,8 @@
{% endif %}
{% if m %}
|
+ style="background-color: color-mix(in hsl, currentcolor {% calendar_opacity m.sum history.max.sum %}, white)"
+ title="{{ m.sum|pmrvalue }}">{% up_down_icon m.sum %}
{% else %}
|
{% endif %}
diff --git a/nummi/history/templatetags/history_extras.py b/nummi/history/templatetags/history_extras.py
index 5289f5d..0b02d24 100644
--- a/nummi/history/templatetags/history_extras.py
+++ b/nummi/history/templatetags/history_extras.py
@@ -9,7 +9,7 @@ register = template.Library()
@register.simple_tag
def calendar_opacity(v, vmax):
- return f"{math.sin(math.fabs(v/vmax)*math.pi/2):.3f}"
+ return f"{math.sin(math.fabs(v/vmax)*math.pi/2):.0%}"
@register.simple_tag
diff --git a/nummi/main/static/main/css/plot.css b/nummi/main/static/main/css/plot.css
index dcf1771..3f7cf6b 100644
--- a/nummi/main/static/main/css/plot.css
+++ b/nummi/main/static/main/css/plot.css
@@ -89,12 +89,6 @@ table.full-width col.bar {
margin-top: var(--gap);
font-feature-settings: var(--num);
- .p {
- background: var(--green);
- }
- .m {
- background: var(--red);
- }
table {
tbody tr {
background: initial;
@@ -104,6 +98,16 @@ table.full-width col.bar {
&:not(:first-child) {
border-top: none;
}
+
+ td {
+ text-align: center;
+ &.p {
+ color: var(--green);
+ }
+ &.m {
+ color: var(--red);
+ }
+ }
}
}
}