I’m following the dash wind streaming example to stream data from a MySQL database.
Data is added to the database every 5 seconds and queried respectively.
I used the Interval component to query and a hidden div to store.
I read the jsonified data in a callback function into a dataframe called df.
I generate a trace using the following:
trace_sensor_1 = Scatter( x=df.loc[df['sensor_id'] == 1]['timestamp'], y=df.loc[df['sensor_id'] == 1]['sensor_reading'], mode='markers+lines', name='Sensor 1',
However, the scatter plot that this generates (attached) jumps all over the place. Is this due to the mode I’m using?
How do I make this a proper time series scatter plot?