esnet / pond

Immutable timeseries data structures built with Typescript
http://software.es.net/pond
Other
205 stars 38 forks source link

Unexpected serialisation result of empty time series #122

Open katrotz opened 6 years ago

katrotz commented 6 years ago

Given an empty time series instance

const emptyTimeSeries = new TimeSeries({
    name: 'Empty time series',
    columns: [ 'time', 'data' ],
    points: []
});

I would expect to get the list of columns

// Expected [ 'data' ]
// Actual []
emptyTimeSeries.columns(); 

and would expect to get the series serialised

// Expected "{"name":"Empty time series","utc":true,"columns":["time","data"],"points":[]}"
// Actual undefined
emptyTimeSeries.toString();
pe7r commented 3 years ago

I am having the same issue. When this will be fixed?