Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Insidetext font size is variable on mobile

I have a bar graph with number labels inside the bars. I set the font size at initalization. But if I change to a mobile viewport, the font size varies depending on the number of digits. Example below

bar-font-size

Thanks for reporting! I’ve replicated the issue:
image

This is sort of by design - If there were really large numbers like 1000 next to small numbers like 5, then we have to shrink the font-size of the large numbers (1000) to fit the bar but we might not necessarily want to make the small number (5) the same small font-size as 1000.

I’ve reported the issue here: https://github.com/plotly/plotly.js/issues/2180, let’s continue the discssuion there.

1 Like