To give full context. I’m getting some CSV data (from a certain period of time) parsing it using papaparse, then splitting the data into an array of dates (these are actual date objects created through momentjs) and an object with arrays, the keys being based off other headers in the original data.
The issue I’m having is that the yaxis (that is being populated via the keyed object arrays) doesn’t go in the correct order/work how I would expect it too. I’m sure I must have just missed or misunderstood something but here’s some semi-pseudo code for the layout/plot creation (so I don’t print everything out) and a screenshot showing what’s going on with the yaxis.
const layoutConfig = {
title: false,
xaxis: {
linecolor: '#000000',
linewidth: 2,
type: 'date',
dtick: 43200000,
tickformat: '%a\n%H:%M'
},
yaxis: {
linecolor: '#000000',
linewidth: 2
},
margin: {
l: 50,
r: 50,
b: 100,
t: 50,
pad: 4
},
dragmode: 'pan'
};
let traces = [{ x, y, marker: { color: '#7d7e35' }, mode: 'lines' }];
Plotly.newPlot(
_charts[headerText],
traces,
layoutConfig,
optionsConfig
).then(() => {
Loader.finish();
});