Closed Steppschuh closed 6 years ago
sorry for the late reply. this is a great point, and it's a pain point for many people (including us at Robinhood where sometimes the .
or $
animates unexpectedly). Ticker 2.0 release will be happening in the next week or two, and it will have substantial changes on how characters animate that will fix the issues you are seeing.
Just getting started with this library, I don't understand why it animates chars that are not part of the currently set character list. IMHO, these chars should not be animated at all.
For my use case, I'm displaying a percentage value (e.g.
81.03%
). However, the%
char is not included in the default lists provided by theTickerUtils
, thus the ticker animates it on every value change.The straight forward fix for that was adding the
%
char to a new character list and using it for the ticker:I think something like
extendCharacterList
would be nice to have as part of theTickerUtils
. Note that the implementation above doesn't check for duplicate characters.