-
Notifications
You must be signed in to change notification settings - Fork 277
Description
The homepage of this package lists only d3 as a dependency. However, every example seems to use jQuery. I see that Issue #62 seems to be complete, but I am unable to get it completely working with only d3. It looks as though an adapter (jQuery, MooTools, zepto) is needed.
One example:
new Epoch.Time.Line({el: '#graph', data: []})
If I try to declare a real-time line chart (without including width and height), I see failures due to this line:
https://github.com/fastly/epoch/blob/master/src/core/chart.coffee#L41
This is because d3 selectors do not have a width
function like jQuery does. Doing this prevents the issue, but I would like to be able to use the auto width/height functionality.
new Epoch.Time.Line({el: '#graph', data: [], width: 300, height: 300})
This may just be a documentation issue, or it may be a bug, depending on the goal of the library. If the goal is to only have d3 as a dependency, there are some spots where the code needs fixing. If the goal is to have one of the provided adapters be a dependency, this probably needs to be reflected in the docs somehow