Accessing information whether the text of a given trace is hidden or not

So as you can see I have configured my plot with ‘textposition=inside’ and uniformtext_mode=‘hide’.
Thus if the text inside a trace is getting too small, it will get hidden.


My goal is to have a function that detects whether a text of the given fig.trace is hidden or not and generates an annotioation.

So my thinking is, that somewhere there must be a low-level attribute that controls ‘hide’ with True or False but after inspecting
.full_figure_for_development() i have not found such thing.

Is there any other way I have not yet thought about, in order to access that information?

Any hint would be greatly appreciated. I’m still fairly new to python plotly.


I still have not found any solution to this problem. Can anybody help? Thanks

Could you post the code used to produce the graph in the first post?

sure, sure. So basically a simple for loop and a bunch of functions that set some layout value, which should not be important for the question.

                for contestant, group in dff.groupby(category_chosen, sort=False):
                    fig.add_trace(go.Bar(x=group[category_chosen], y=group["value"],
                                         name=contestant, text=group['value'],
                                         textposition='auto', texttemplate=set_textformat(group),
                                         marker={'color': set_color(group)
                                         hovertemplate=f'{contestant}<br>' + '%{x[1]} - %{x[0]}:%{y}',