Annoying behavior of a dynamic angular gauge
Don't know why but if you have a Quantity[513.2441798845927, "Minutes"]
wrapped with Dynamic
, then AngularGauge
can't handle it and shows two inputs, 513.23
and "Minutes"
(blue one).
I also don't know if that's suppose to happen but here's a work around:
Use QuantityMagnitude
:
Dynamic[AngularGauge[
Dynamic[Refresh[
QuantityMagnitude @ DateDifference[Now, Tomorrow, "Minute"],
UpdateInterval -> 0.1
]],
{0, 1000}]
]
Or don't use the inner Dynamic
since there is one outside anyway:
Dynamic[AngularGauge[
Refresh[DateDifference[Now, Tomorrow, "Minute"],
UpdateInterval -> 0.1], {0, 1000}]]
The former method gives you more flexibility I think.
It can also be done this way. I recommend it because it avoids passing any complicated dynamic expression to AngularGauge
.
Dynamic[
AngularGauge[
Quantity[DateDifference[Now, Tomorrow, "Minute"]],
{Quantity[0, "Minute"], Quantity[800, "Minute"]},
GaugeLabels -> "Unit"],
UpdateInterval -> 1]
The tooltip confirms that the gauge is dynamically updating.