-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Needs Updated Dependencies #145
Comments
Looks like you might be right, I am unsure how the unit tests missed this but they will need to be updated. @mattdodge - Would you mind perhaps digging in, fixing the tests, and the core implementation? It would be a great help if you could open a PR that addresses the issues you've found. |
No idea if this is still an issue. If anyone is seeing the same issue, please report it here. |
I am unable to reproduce this. Works fine without the |
It's been a while since I've looked at this, but pulling down the latest does seem to prevent any JS errors from popping up. I see there are I haven't been using the library, so don't know how much I can help. But for what it's worth, I am still unable to get a chart to appear using the d3 syntax. The examples on the docs are still all jQuery dependent. When running this: new Epoch.Time.Line({el: '#graph', data: data}); I just see an empty chart like so: But the documented jQuery syntax: $('#graph').epoch({type:'time.line', data: data}); makes the chart render properly (or at least I see something): I'm fine with this being closed since it's been so long. But figured you might want to be aware of what I was seeing when using only d3 (no jQuery). Let me know if I can help — I can set up a fiddle or plunkr if needed. |
Thanks is for following up on this, I was able to get a d3 only example
|
Awesome, sounds good! |
Also sorry it took so long to address the issue, the repository was locked
|
@mattdodge try this example: <html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> -->
<script src="dist/js/epoch.js"></script>
<link rel="stylesheet" type="text/css" href="dist/css/epoch.css">
</head>
<body>
<div class="epoch" id="event-bar-chart" style="width: 500px; height: 150px"></div>
<script>
var chart = new Epoch.Time.Line({
el: '#event-bar-chart',
axes: ['right', 'bottom'],
tickFormats: {
right: function (d) {
return '$' + (d / 100000).toFixed(3);
}
},
data: [
// First series
{
label: "Series 1",
values: [{time: 1370044800, y: 1000000}, {time: 1370044801, y: 1000000}]
},
// The second series
{
label: "Series 2",
values: [{time: 1370044800, y: 780000}, {time: 1370044801, y: 98000}]
}
]
});
chart.draw();
</script>
</body>
</html> This seems to render just fine for me. |
Oh I think I just spotted the issue, you have to call |
Ah, yep, that did it! |
We should probably have both methods work the same way, can you do me a
|
No problem, threw it up over at #195 |
Thanks man! If you have time to look into it I would appreciate it (super
|
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:
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.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
The text was updated successfully, but these errors were encountered: