Open chenc17 opened 4 years ago
I see the same problem. You can resolve your issue by adding:
var global = global || window;
before
d3 .select('#eventdrops-demo'): .data([repositoriesData]) .call(chart);
However, even though this clears the error, the code still doesn't work (it doesn't seem to parse the data). You can force downgrade the library version to 1.0.0 :
<script src="https://unpkg.com/event-drops@1.0.0/dist/index.js"></script>
instead of:
<script src="https://unpkg.com/event-drops"></script>
and it will sort of work--at least it will paint a drop on the timeline, but it still isn't working correctly for me. (The drop doesn't get painted in the correct location vis a vis the legend, it doesn't scroll, but it will disappear if the time window for the drop is not in the range displayed on the timeline legend.)
Hmm, ok! Thanks for looking into this for me!
Just a quick follow-up.
I have these libraries working together to render eventdrops:
<script src="https://unpkg.com/d3@4.13.0/build/d3.min.js"></script>
<script src="https://unpkg.com/event-drops@1.2.0/dist/index.js"></script>
I have been unable to get newer versions working, which is disappointing since some of the features were desirable. In order to update with new data or selections, for example, I'm rendering in an iframe that I can reload with new parameters...
Hi,
I would recommend getting the latest from master and building the repo yourself. There are a few PR I have made (which are merged) that fixes a few bugs (mentioned in this issue). I am not a maintainer, so I cannot update NPM unfortunately.
What you were expecting: I tried to make a very simple timeline without a module bundler by following the instructions in the "Usage" section.
What happened instead: I get the following console errors:
Steps to reproduce:
Put the code in the "Related code" section below in a file called "index.html" and open it in a Firefox or Chrome browser.
Related code: