Black Lives Matter. Please consider donating to Black Girls Code today.

How to solve legend is too much and too long in Plotly Bar graph

Hello, I have an issue in Plotly bar graph. Since we need to do a features importance ranking.

So here is the code


import plotly.graph_objs as go

    fig = go.Figure(go.Bar(
                x=list(feature_imp.values(),
                y=list(feature_imp.keys(),
                orientation='h'))

And the result is shown below, the legend name is hidden and the number of legends is not correct match as well.

Could someone help with that?