Open eskimoblood opened 7 years ago
I do agree that better non-d3 documentation would be nice, as almost all the examples use d3 by default, which is a bit frustrating. The best documentation I found was inside the tests, like this:
that said - I'm in the midst of converting my project to d3 anyway because things weren't laying out the way I expected and I couldn't tell where the fault lay. Figures ;)
I think cola only directly uses d3 for the drag interface and the timer. Also I think the top example on the cola homepage uses three.js and not d3.
I don't know if it's helpful, but you could look at the adaptor that dc.graph.js uses for cola: https://github.com/dc-js/dc.graph.js/blob/master/src/cola_layout.js
It's still a d3-based library, but the cola stuff is pretty well isolated so you can see the inputs and outputs.
I'm also looking for an example without D3, and could not find one.
Yeah, some examples without D3 would be very useful. We just want to use cola for node positions and render them in react or whatever. Thanks
Here's a React Wrapper for WebCola.
A vanilla HTML example would be very helpful, especially since it could be easily modified for any framework (or no framework).
The bigger problem is that the distribution includes D3 as dependencies anyway, and then you can't bundle them from NPM with e.g. Rollup.
What would be the best solution is a distribution of Cola that just includes the layout sources in module form and a separate module for marrying them to D3 if one chooses, as not everyone wants or needs to use D3 but is penalized for doing so anyway.
Further, not everyone wants to use CommonJS, and a decreasing amount of projects are using that module format nowadays.
+1
+1
Hi, this is more a questions then an issue. I wonder if there is a way to use the cola without d3. As we use another library to render our chart it would be cool if could use cola to calculate the coordinates for the nodes and gives this data our chart library.