Not sure why thatβs happening. I set up a simple demo which has accurate spacing. Maybe you have some code that inadvertently changes the x-axis to be on a fixed interval.
import dash
import dash_core_components as dcc
import dash_html_components as html
import datetime
app = dash.Dash(__name__)
datetime_ints = [201909240908, 201909240956, 201909241002]
y = [10, 20, 50]
datetimes = [datetime.datetime.strptime(str(dt_int), "%Y%m%d%H%M") for dt_int in datetime_ints]
app.layout = html.Div([
dcc.Graph(
id='example-graph',
figure={
'data': [
{'x': datetimes, 'y': y, 'mode': 'lines+markers'},
],
}
)
])
if __name__ == '__main__':
app.run_server(debug=True)