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@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') $ domodifyState 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/IHaskellOn Mon, Apr 7, 2014 at 4:44 PM, Kai Zhang <kai@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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe