janjakubnanista / downsample

Collection of several downsampling methods for time series visualisation purposes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: support x array and y array input data

Benjamin-Lee opened this issue · comments

I'm using Plotly and have formatted my tooling to generate data formatted like this:

var trace1 = {
  x: [1, 2, 3, 4],
  y: [10, 15, 13, 17],
  mode: 'markers',
  type: 'scatter'
};

var trace2 = {
  x: [2, 3, 4, 5],
  y: [16, 5, 11, 9],
  mode: 'lines',
  type: 'scatter'
};

var trace3 = {
  x: [1, 2, 3, 4],
  y: [12, 9, 15, 12],
  mode: 'lines+markers',
  type: 'scatter'
};

var data = [trace1, trace2, trace3];

Plotly.newPlot('myDiv', data);

Since there's a lot of data (the reason I'm downsampling in the first place!) changing data shapes twice would be a big overhead unless there's an efficient way I'm missing.

Hi @Benjamin-Lee! Thank you for your feature request! I will keep you posted on progress on this, I think it's quite simple to implement. Talk soon!