Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Horizontal Stacked Bar chart with table anchored to it

Hello,

I am trying to create a horizontal stacked bar chart with a table anchored to it.

I have went through the simple variations but I cannot access the layout of the chart without effecting the table.

My code looks like this, where reverse_trace is a list of bar charts.

figure = ff.create_table(dataframe[dataframe.Fund == array],height_constant=60)
figure[‘data’].extend(go.Data(reverse_trace))
figure.layout.xaxis.update({‘domain’: [0, .5]})
figure.layout.xaxis2.update({‘domain’: [0.5, 1.0]})
figure.layout.yaxis2.update({‘anchor’: ‘x2’})
figure.layout.xaxis2.update({‘anchor’: ‘y2’})

@mikedoh89 - An easier way to do this might be to just create 2 different graphs:

html.Div([
    dcc.Graph(...),  # bar chart
    dcc.Graph(...),  # table
])

and the second table could be an HTML table or one of the dash-table-experiments tables (github.com/plotly/dash-table-experiments)