Actually there are two different libraries that do this:

- https://github.com/folkertdev/graph-layout
- https://github.com/gampleman/elm-visualization/pull/4

I would suggest taking a look at these (both use somewhat of a different 
approach) and seeing how they fit your needs. Neither of them is published 
yet, but I plan to ship that PR soon-ish.

On Tuesday, 30 May 2017 22:54:20 UTC+1, Chad Stearns wrote:
>
> Hey Jan,
>
> I think I can help you with this. I am working on a force diagram for my 
> client. Right now I have some stuff going in D3, but integrating that into 
> an Elm app is pretty sketchy. Its forcing me to consider an all-Elm 
> solution. I don't really know anything about force graph mathematics, but I 
> could learn, and I have published a few Elm packages.
>
> I agree with your itemization of the functionality. How can we collaborate?
>
> Best,
> -Chad
>
> On Sunday, May 28, 2017 at 8:03:05 AM UTC-4, Jan Hrček wrote:
>>
>> Hello all,
>>
>> I was surprised that there's no elm package that would enable to render 
>> force directed graph layout animation purely in elm (please let me know if 
>> there's any existing package supporting this). So I tried implementing it 
>> myself and here's my first prototype [1] (source code here [2]). I'm 
>> playing with an idea of making this into reusable library.
>>
>> Would some of you find such library useful? If so what functionality it 
>> should provide?
>>
>> My idea for the functionality provided by the library would be this:
>>
>> What you provide: 
>> - a graph with some data (probably based on elm-community/graph)
>> - parameters of the layout algorithms (similar to what you see in the 
>> prototype)
>> - node and edge rendering function (something returning Svg elements for 
>> rendering nodes and edges, given (x,y) coordinates of the nodes)
>>
>> What library would do for you: 
>> - it would enrich the graph by adding "node position" information and 
>> would simulate how these positions change over time
>>
>> I'd be grateful for any comments / questions / ideas for improving my 
>> existing code.
>> regards,
>> Jan Hrček
>>
>> [1] http://janhrcek.cz/elm-graph-layout.html
>> [2] https://github.com/jhrcek/force-layout
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to