billboard.js icon indicating copy to clipboard operation
billboard.js copied to clipboard

flashing gauge is a visual irritant

Open blazespinnaker opened this issue 4 years ago • 5 comments

When you update the gauge frequently it will blink/flicker/flash on each update. Such flashing is visually irritating for many folks and unnecessary unless there is a need to call attention to the update (charts don't flash when they get updated, tho)

I put https://github.com/naver/billboard.js/blob/fad9e86fa172cb14a2cc6f2fb8418e72a5932192/src/ChartInternal/shape/arc.ts#L827

opacity to 1 to remove the flashing, but perhaps it should be an option in the gauge config. I haven't encountered any issues with this, but there could be implications I am missing.

blazespinnaker avatar Jan 11 '21 14:01 blazespinnaker

if you think, by adding an option or the update can improve, contributing to the project will be a best option.

netil avatar Jan 14 '21 02:01 netil

The opacity=0 set there, is to make smooth gauge text value transition.

Checkout the below example, where the 30.0%/38.0% area w/opacity, texts are fading-out and fading-in after data toggle. w/o opacity, texts looks moving its position after the data toggle.

opacity=0 w/o opacity
gauge-text01 gauge-text02

netil avatar Jan 22 '21 05:01 netil

This is an odd use case for a gauge. The point of the gauge is generally meant to be a single value on most chart frameworks, like the speed in a car. The above would be better off as one of the other charts.

When I use it with a single value, I didn't encounter the visual artifact you mentioned. And, tbh I prefer that over flashing which I find very distracting.

Other frameworks don't flash the text when updating their gauge I've noticed.

https://developers.google.com/chart/interactive/docs/gallery/gauge

blazespinnaker avatar Jan 25 '21 22:01 blazespinnaker

@blazespinnaker well everyone's needs aren't same. In this case just providing as an option(ex. gauge.opacity) can be a solution.

netil avatar Jan 26 '21 00:01 netil

True enough, however I imagine you'll find that the opinion of flashing and blinking is fairly universal when it comes to ux style guides.

blazespinnaker avatar Jan 26 '21 15:01 blazespinnaker