Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

[solved] clickData with other Inputs

The project I’m working on requires inputs from click data on a Scatter plot and 3 dropdowns which in turn update another graph. When clickData is the only input, checking if it is/not None makes everything work as expected. However, when there are the other inputs from the dropdowns, checking if clickData is/not None causes the whole page to not load correctly and the console displays ‘TypeError: Cannot read property ‘data’ of null’… Everything works fine if I don’t check if clickData is/not None but I’d rather not see the error of how a NoneType object is not subscriptable.

  • Jason

edit: This was some weird error but if clickData was None I just returned a blank default graph which fixed the error.