X-axis category changes based on filter setting

Does plotly have the ability to change the category in x-axis as needed? For example, if I have a dropdown filter with different cities and the x-axis categories for those cities are different, can plotly graphs be interactive and change as needed such as the one below made with Tableau? Thank you!

Example graph:
Note: may need to click on renew button to display the graph