1 year ago
#387177
Pat
I've created a scatter plot with plotly/dash in python and I would like to be able to filter the table next to it by clicking at certain scatter point
app = Dash(__name__)
colors = {
'background': '#ededed',
'text': '#0b1710'
}
fig = px.scatter(df, x="AverageTime", y="Machine",
size="Jobs", color="Category", hover_name="MaxTime",
log_x=False, log_y=False, size_max=70, labels={
"AverageTime": "Average time since last update(min)",
"Machine": "Machine code",
"MaxTime": "Longest time since last update(min)",
"Category": "Department",
}, title="Vision Labs Orders Movement Tracking")
app.layout = html.Div([
dcc.Graph(
id='graph',
figure=fig
)
])
fig.update_layout(
plot_bgcolor=colors['background'],
paper_bgcolor=colors['background'],
font_color=colors['text'],
autosize=True,
height=900
)
if __name__ == '__main__':
app.run_server(debug=True)
to This is my current code for better understanding. If I knew how to fetch data needed to filter the table by clicking on the point I would be able to establish that in pure python probably
python
plotly
data-visualization
plotly-dash
scatter-plot
0 Answers
Your Answer