Skip to content
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

Working D3 graph seems to break on Tributary #102

Open
audreyfeldroy opened this issue Aug 3, 2013 · 5 comments
Open

Working D3 graph seems to break on Tributary #102

audreyfeldroy opened this issue Aug 3, 2013 · 5 comments

Comments

@audreyfeldroy
Copy link

This D3 graph works fine locally and on bl.ocks.org, but it seems to mis-render on Tributary:

http://tributary.io/inlet/6145702

The working version, for reference: http://bl.ocks.org/audreyr/6145702

The problem appears to be on Tributary's end. The code from index.html looks like it is being inserted into the DOM 4 times for some reason.

It could be something I'm doing wrong too...I'm new to Tributary. I just figured it would be good to report this just in case it's helpful.

@georules
Copy link
Contributor

georules commented Aug 3, 2013

Tributary provides you with a lot of context. There is already an "svg" element, so you don't need that index.html. json files are loaded automagically into a variable in the tributary object. e.g. commit_activity.json is automatically loaded into tributary.commit_activity

Fixed for tributary:
http://tributary.io/inlet/6146284

To be fair, this is something you would only know by playing with other people's inlets, watching some mixtapes from enjalot, or reading documentation. The tributary.io website itself might be able to explain this in a quick&simple way.

@audreyfeldroy
Copy link
Author

I know about the automagical context, but the reason I purposely create my inlets that way is to make them compatible with bl.ocks.org.

Without adding the svg element and loading the json via D3, the code breaks on bl.ocks.org.

@audreyfeldroy
Copy link
Author

Ah, I see issue #91. It's not quite a duplicate but related. The issue here is compatibility from tributary -> blocks.

@georules
Copy link
Contributor

georules commented Aug 3, 2013

Ah, true. I was looking at #91 as well, but haven't come up with a good solution yet.

@enjalot
Copy link
Owner

enjalot commented Aug 3, 2013

One way to handle this would be to make index.html a special file that tributary does not try to load. this way you could set it up to work on bl.ocks.org while working out of inlet.js in tributary. I could see this as a good convention, that way you can prototype in tributary and once you're happy you can make it available on blocks.

the only problem with this is that if someone tries to use index.html for a tributary inlet, we need some way of letting them know in the UI what the convention is.
actually, we need a lot more indications of the conventions in the ui as you guys have stated. This will be much easier to do in the rewrite, but I may add this index.html to the current tributary soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants