Dash ve Plotly ile Paneller Oluşturma
Alex Scriven
Data Scientist
$$
$$
# Figure ve yerleşimi oluştur dcc.Graph(id='bar_fig', figure=ecom_bar),html.Br(), html.H2("The Hover Data:"), html.P(id='text_output')
$$
# Bir callback ayarla @callback( Output('text_output', 'children'), Input('bar_fig', 'hoverData'))def capture_hover_data(hoverData): return str(hoverData)
Ne olur:
hoverData özelliği değişir.P() etiketine döndürür
hoverData içinde
ecom_scatter = px.scatter(ecom_data,
x='Total Sales ($)',
y='Sales Volume', color='Country',
custom_data=['Country'])
customData ülkeyi içeriyor!
clickData özelliği)@callback(
Output('text_output', 'children'),
Input('bar_fig', 'clickData'))
def capture_hover_data(clickData):
return str(clickData)

Dash ve Plotly ile Paneller Oluşturma