You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created an addData method, useful if you want append new data instead of replace it entirely.
This is useful to me because server does not send 1 datum to my clients every 1 second, but it sends an array of data every 50 seconds. So I can't use time.line.
Code is written in Javascript. I do not know CoffeScript, so I can't create a pull request.
Base.prototype.addData = function(data, options) {
var prepared;
if (options == null) {
options = {};
}
prepared = this._prepareData((this.rawData = this._formatData(data)));
var values;
var toadd_values;
var add_data = this._annotateLayers(prepared);
for (var i=0; i<this.data.length; i+=1) {
values = this.data[i].values;
toadd_values = add_data[i].values;
values.push.apply(values, toadd_values);
}
return this.data;
};
The text was updated successfully, but these errors were encountered:
So Coffeescript is a 1-to-1 translation of JavaScript. This means that your implementation should be able to be easily transformed in its current state. Please give it a go (even if it doesn't work right off the bat) and I can help you get it all the way via a PR :)
To get started check out the various methods already implemented in the library and use this as a simple reference: http://coffeescript.org/
I created an addData method, useful if you want append new data instead of replace it entirely.
This is useful to me because server does not send 1 datum to my clients every 1 second, but it sends an array of data every 50 seconds. So I can't use
time.line
.Code is written in Javascript. I do not know CoffeScript, so I can't create a pull request.
The text was updated successfully, but these errors were encountered: