Stacked bar chart with callback

I try to create a stacked bar chart; if I click at a bar, it will show the contents. My code only works for one layer. Can anyone help?

drill down to 2-level bar chart

import plotly.graph_objects as go
import plotly.graph_objects as px
from ipywidgets import Output, VBox

x = [‘LA’, ‘Chicago’, ‘Phoenix’, ‘Madison’]

plot = px.FigureWidget(data=[go.Bar(
name = ‘ICE Cars’,
x = x,
y = [100, 200, 500, 673]
name = ‘EVs’,
x = x,
y = [56, 123, 982, 213]
barplot0 =[0]
barplot1 =[1]

create our callback function

out = Output()
def update_point(trace, points, selector):
c = list(barplot.marker.color)
for i in points.point_inds:
c[i] = ‘#bae2be
with f.batch_update():
barplot.marker.color = c

VBox([plot, out])