Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

typo in getting_started.ipynb #107

Open
hopezh opened this issue Nov 6, 2022 · 1 comment
Open

typo in getting_started.ipynb #107

hopezh opened this issue Nov 6, 2022 · 1 comment

Comments

@hopezh
Copy link

hopezh commented Nov 6, 2022

There is a typo in the 2nd to the last line in the 2nd to the last callback func:

@app.callback(
    dash.dependencies.Output('x-time-series', 'figure'),
    [dash.dependencies.Input('crossfilter-indicator-scatter', 'hoverData'),
     dash.dependencies.Input('crossfilter-xaxis-column', 'value'),
     dash.dependencies.Input('crossfilter-xaxis-type', 'value')])
def update_y_timeseries(hoverData, xaxis_column_name, axis_type):
    country_name = hoverData['points'][0]['customdata']
    dff = df[df['Country Name'] == country_name]
    dff = dff[dff['Indicator Name'] == xaxis_column_name]
    title = '{}
{}'.format(country_name, xaxis_column_name)
    return create_time_series(dff, axis_type, title)

The {} in front of .format should be removed.

The correct code for this section should be:

    title = '{}'.format(country_name, xaxis_column_name)
    return create_time_series(dff, axis_type, title)

Please kindly check and verify.

@AKBuggy
Copy link

AKBuggy commented May 10, 2023

I think this issue has been resolved.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants