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!

Date keeps formatting to December 31, 1969

I have a line graph where the x-axis is supposed to be a date-time value with the day, month, year and time. The code that handles the initial plot looks like this:

Plotly.plot('realtime_data_line', 
		[{
			x: [dataProps.time],
			y: [dataProps.value]
		}],
		{
			xaxis:
			{
				range: [0, 25],
				title: 'Time'
			},
			yaxis:
			{
				title: dataProps.measure
			}
		});

And the date that is fed into it looks like this:

2017-02-14 04:18:32

The rest of the graph uses extendTraces(), so that’s why my plot function only plots one point. The date keeps appearing, however, as December 31, 1969. My date should be formatted correctly, so I don’t know what the cause it. Any help would be much appreciated.

It turns out my range property which was from a previous iteration of the plot was screwing everything up. 0 is the Unix epoch, and it was starting from 0. Case closed.