epochjs / epoch

A general purpose, real-time visualization library.
http://epochjs.github.io/epoch
MIT License
4.97k stars 278 forks source link

Cannot read property 'x' of undefined #223

Open 63degrees opened 8 years ago

63degrees commented 8 years ago

angular.js:13550 TypeError: Cannot read property 'x' of undefined at a.Epoch.Time.Plot.a._updateTicks (http://localhost:45454/Scripts/epoch.min.js:74:220) at a.Epoch.Time.Plot.a._shift (http://localhost:45454/Scripts/epoch.min.js:72:149) at a.Epoch.Time.Plot.a._startTransition (http://localhost:45454/Scripts/epoch.min.js:69:457) at a.Epoch.Time.Plot.a.push (http://localhost:45454/Scripts/epoch.min.js:71:503) at http://localhost:45454/Scripts/ng-epoch.js:80:31 at n.$digest (http://localhost:45454/Scripts/angular.min.js:142:306) at n.$apply (http://localhost:45454/Scripts/angular.min.js:145:249) at i. (http://localhost:45454/app/services.js:19:32) at i.f.(anonymous function).(anonymous function) (http://localhost:45454/Scripts/jquery.signalR-2.2.0.min.js:8:33219) at i.n.event.dispatch (http://localhost:45454/Scripts/jquery-2.2.3.min.js:3:7537)

63degrees commented 8 years ago

This was trying to render an area chart. dataitem.value = 38.

chartEntry.push({ time: timestamp, y: dataItem.value });

$scope.areaAxes = ['left', 'right', 'bottom'];

rsandor commented 8 years ago

Can you show me how you define chartEntry?

63degrees commented 8 years ago

var timestamp = ((new Date()).getTime() / 1000) | 0; var chartEntry = []; chartEntry.push({ time: 0, y: 0 });