Using Example 2 of the plotly documentation. Implement a step that takes in the current run id callback and outputs a dataframe of all mongo data in that run id. This will reduce the amount of database calls that need to be performed for simple operations.
Example code would work similar to this
@callback(
Output('testing-data', 'data'),
Input('testing-day', 'value'))
def load_data(value):
mongo_data = mongodb.find_documents() # find everything in {testing-day}
return json.dumps(mongo_data)
@callback(
Output('t', 'figure'),
Input('testing-data', 'data'))
def update_graph_1(jsonified_cleaned_data):
Using Example 2 of the plotly documentation. Implement a step that takes in the current run id callback and outputs a dataframe of all mongo data in that run id. This will reduce the amount of database calls that need to be performed for simple operations.
Example code would work similar to this