def METHOD_NAME(screen: Screen):
    """https://github.com/zauberzeug/nicegui/discussions/948"""
    chart = ui.chart({'legend': {'enabled': True}, 'series': []}, type='stockChart', extras=['stock'])
    ui.button('update', on_click=lambda: (
        chart.options['series'].extend([{'name': 'alice'}, {'name': 'bob'}]),
        chart.update(),
    ))
    ui.button('clear', on_click=lambda: (
        chart.options['series'].clear(),
        chart.update(),
    ))
    screen.open('/')
    screen.click('update')
    screen.should_contain('alice')
    screen.should_contain('bob')
    screen.click('clear')
    screen.wait(0.5)
    screen.should_not_contain('alice')
    screen.should_not_contain('bob')