[Haskell-cafe] Library for creating interactive diagrams?

Andrew Gibiansky andrew.gibiansky at gmail.com
Tue Apr 8 01:18:32 UTC 2014

All of this would rely on the IHaskell interface, and would not work with
any other interface or work with raw SVG/HTML/JS/etc.

I'd love to have a different approach though, in case anyone knows of one :)

On Mon, Apr 7, 2014 at 5:55 PM, Kai Zhang <kai at kzhang.org> wrote:

> Looks like you are going to add some "control bars" to diagrams. This is
> definitely a nice feature to have. But how would you be able to do
> something like changing the color of a circle when you place the mouse on
> it? I want control bars as well as some interactivity built directly into
> the SVG.
> On Mon, Apr 7, 2014 at 4:56 PM, Andrew Gibiansky <
> andrew.gibiansky at gmail.com> wrote:
>> I am very interested in using this with IHaskell, but don't know of
>> something that exists already. I am currently working on using IPython
>> widgets with IHaskell in order to create a generic "event handling"
>> framework for *any* sort of displays. Code might look like this (just
>> some initial thoughts):
>> -- Uses a StateT of some sort. Reruns things every time
>> -- a dependent value changes, and shows the updated output.
>> interactive $ do
>>   -- Display a slider. The value changes every time the slider moves.
>>   width <- slider # name "Picture Width" # range 0.1 5
>>   -- Rerun this event every key press. It can modify the state.
>>   onEvent (keyPress 'c') $ do
>>     modifyState doSomething
>>   -- Make a diagram using the current state. Rerun every time a
>>   -- slider value changes or key press event happens.
>>   diagram <- makeDiagram
>>   -- Show the diagram. This is what will chance in the IHaskell display.
>>   display diagram
>> I have Diagrams already working with IHaskell, and interactivity already
>> working in another example (interactive parsers with Parsec, see error
>> messages etc as you type), so all that remains is combining them. I'm
>> hoping to get it working nicely sometime this summer when I have more time,
>> but if you're interested in this approach, feel free to contact me.
>> [0] IHaskell: https://github.com/gibiansky/IHaskell
>> On Mon, Apr 7, 2014 at 4:44 PM, Kai Zhang <kai at kzhang.org> wrote:
>>> Hi cafe,
>>> Is there any active project about creating interactive diagrams, like
>>> D3js http://d3js.org/ ? The Diagrams library has already done a good
>>> job of making static images. Would it be possible to extend this library to
>>> support declaring interactive diagrams and then use JS and HTML as backend
>>> to draw them?
>>> Example: circle 1 $ with & hover .~ (change style)
>>> PS: I don't want a D3js binding.
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140407/bb0064b5/attachment.html>

More information about the Haskell-Cafe mailing list