Open ildar170975 opened 5 months ago
Just to note: the current behaviour is apparently "by design": https://github.com/kalkih/mini-graph-card/blob/af01df1e2a68cbdd367cf8e27ada26ea8f41d83b/src/buildConfig.js#L158
But that doesn't mean we can't improve it.
Additional suggestion: if both bounds also have the same time (as will happen with points per hour > 60), show only one time.
if both bounds also have the same time (as will happen with points per hour > 60), show only one time.
Agreed!
Consider this card:
The selected point belongs to an interval which has both left & right bounds from "yesterday". Only a time is displayed for these bounds.
Another case - an interval with bounds from different days:
This happens if
hours_to_show
<= 24.Now check this card:
When both bounds are from "today" - a date is displayed for both bounds:
When bounds from different days - dates are shown for both bounds as well, looks OK:
And when both bounds are from same "not-today" day:
Proposals:
hours_to_show
).hours_to_show
).Alternatively:
hours_to_show
<= 24 - do NOT show a date for a bound; otherwise - show a date (i.e. leave the current behaviour).