epochjs / epoch

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

Epoch doesn't work in the normal way #237

Open SuperCSS opened 6 years ago

SuperCSS commented 6 years ago

When I tried to use Epoch just in the very simple way, it broke and threw this error: jQuery.Deferred exception: this.el.width is not a function TypeError: this.el.width is not a function at Line.Base [as constructor] (http://localhost:9000/vendor/epoch.js:480:30) at Line.Canvas [as constructor] (http://localhost:9000/vendor/epoch.js:790:34) at Line.Plot [as constructor] (http://localhost:9000/vendor/epoch.js:2486:32) at new Line (http://localhost:9000/vendor/epoch.js:3782:32) at r.fn.init.$.fn.epoch (http://localhost:9000/vendor/epoch.js:3859:37)

My code was so simple: $('#epochHolder').epoch({ type: 'time.line', data: data });

Here, data = [ { label: "Series 1", values: [ {time: 1370044800, y: 100}, {time: 1370044801, y: 1000}] }, { label: "Series 2", values: [ {time: 1370044800, y: 78}, {time: 1370044801, y: 98}] } ];

Has Epoch broken or any version issue? I used epoch.js v0.8.4, d3 v3.5.17 Thanks