(selected_year)
| 29 | @app.callback(Output('graph-with-slider', 'figure'), |
| 30 | Input('year-slider', 'value')) |
| 31 | def update_figure(selected_year): |
| 32 | filtered_df = df[df.year == selected_year] |
| 33 | |
| 34 | fig = px.scatter(filtered_df, |
| 35 | x="gdpPercap", |
| 36 | y="lifeExp", |
| 37 | size="pop", |
| 38 | color="continent", |
| 39 | hover_name="country", |
| 40 | log_x=True, |
| 41 | size_max=55) |
| 42 | |
| 43 | fig.update_layout(transition_duration=500) |
| 44 | |
| 45 | return fig |
| 46 | |
| 47 | |
| 48 | if __name__ == '__main__': |
nothing calls this directly
no outgoing calls
no test coverage detected