r/webdev - javascript+plotly.js question: how to fetch csv to javascript arrays? (for datetime ordering)
Strategy

how to fetch csv to javascript arrays? (for datetime orderin…


This is actually a general javascript question. I use plotly.js to display my sensors in my dashboard. My purpose here is to start the graph in first datetime and ends in last datetime

This is the csv I have

r/webdev - javascript+plotly.js question: how to fetch csv to javascript arrays? (for datetime ordering)

I had the graph done with this reference. (i just changed the csv file)

r/webdev - javascript+plotly.js question: how to fetch csv to javascript arrays? (for datetime ordering)

the problem is that in reference, the range is fixed, not reading from csv, for example:

var layout = {
  showlegend:true,
  legend: {x: 0.4, y: 1.2},
  title: 'Time Series with Rangeslider',
  xaxis: {
    autorange: true,
    range: ['2021-02-17', '2021-04-10'], //  <--- i'm talking this one

is it possible to make range matching the csv first and last data?



Source link