Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

How to access information in meta argument if a dictionary is passed to meta

Hi I’m using the following code.

go.Figure(go.Scatter(x=[1,2,3], y=[1,2,3],
                    meta={'label_1': 'label_1',
                          'label_2': 'label_2'},
                    hovertemplate="<b>%{meta['label_1']}</b> %{x}"))

I’m passing a dictionary to meta and I am trying to access the values of the dictionary to be passed to the hovertemplate. but this does not seem to work.

Any help is greatly appreciated,

thanks

a solution is

go.Figure(go.Scatter(x=[1,2,3], y=[1,2,3],
                    meta={'label_1': 'label_1',
                          'label_2': 'label_2'},
                    hovertemplate="<b>%{meta.label_1}</b> %{x}"))